Comments (2)
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.
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)
- Upgrade minimum docker client api to 1.24 to maintain compatibility with upcoming docker engine v26 release HOT 3
- Task Health Status wrongly reported as HEALTHY HOT 1
- Update not supported on ARM architecture HOT 1
- Add retries for publishing metrics & health checks
- ECS Deployment Fails Due to Premature Resource Availability Reporting HOT 8
- Add support for custom ECS-Agent and ECS-Telemetry Endpoints HOT 1
- Upgraded ecs agent causes Error loading previously saved state from BoltDB HOT 4
- ECS control plane not compatible with ECS-A and Docker v26 requirements for API version HOT 6
- AWS ECS agent does not start in EC2 instance HOT 3
- Agent is Failing to Add com.amazonaws.ecs.capability.logging-driver.journald Attribute to the Container Instance HOT 1
- Docker client doesn't support zstd compression HOT 1
- ECS agent on windows does not work for more than 10 CPU despite setting 'ECS_ENABLE_TASK_CPU_MEM_LIMIT' to true HOT 4
- Secret in US region, and ECS cluster in Asia pacific region HOT 2
- Run Security Updates without failing long-running tasks HOT 2
- Unable to delete Docker image due to multiple repository references HOT 1
- Specifying docker image for caching during ecs-init
- nvidia-gpu-info.json not being generated since v1.82.4
- Docker tags are not shown for pulled images where tag is specified in task definition HOT 1
- More descriptive log message for "Resources not consumed, enough resources not available" HOT 1
- ECS Instances stuck with "Agent Disconnected" HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amazon-ecs-agent.