Giter Club home page Giter Club logo

Comments (2)

euank avatar euank commented on August 16, 2024

What you're observing is a bash/zsh expansion really. It's common enough to see something like ls *.{csv,tsv}, where the braces expand before the ls program ever sees them. What the Docker run command actually sees is the following:

--env=ECS_ENGINE_AUTH_DATA={https://index.docker.io/v1/:username:my_name} --env=ECS_ENGINE_AUTH_DATA={https://index.docker.io/v1/:password:my_password} --env=ECS_ENGINE_AUTH_DATA={https://index.docker.io/v1/:email:[email protected]}

You notice, bash also destructively removed the double quotes because those also need to be escaped.

If you were to use the /etc/ecs/ecs.config file on an ECS Optimized AMI, I do not believe this issue would manifest because bash doesn't enter into the picture there. Similarly, if you used the --env-file option and specified these in a file, bash again would not alter these. I also don't think there'd be an issue with the values in a systemd unit file.

Finally, for the 'good' option, it would really be better to use single quotes as they allow bash to escape less. Unless I'm mistaken, the current 'good' one would still strip the double quotes and thus still be invalid JSON.

I see an opportunity for documentation improvement here, but I don't think the agent needs to understand and revert preprocessing done outside of its, and Docker's, control and knowledge.

Does the above make sense, or do you think there is a better option agent-side? I definitely agree this can be a bit confusing and documentation improvements would be helpful.

from amazon-ecs-agent.

JasonSwindle avatar JasonSwindle commented on August 16, 2024

Howdy,

It 100% does make sense and I agree about the single quotes. This was mainly raised to see if the agent could / would handle it. Closing. :)

from amazon-ecs-agent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.