Question:
I’m trying to create a Docker context that will automatically integrate with AWS’s ECS.
I’m following this tutorial
The author just does:
docker context create ecs myecs
and gets a “pick an integration” prompt, whereas I get an error saying it needs exactly 1 argument.
1 2 3 4 5 6 7 |
docker context create" requires exactly 1 argument. See 'docker context create --help'. Usage: docker context create [OPTIONS] CONTEXT Create a context |
Answer:
You need to install the Docker Compose CLI preview
The below curl is from here: Docker docs
-
12curl -L https://raw.githubusercontent.com/docker/compose-cli/main/scripts/install/install_linux.sh | sh
-
12sudo docker context create ecs myecs
It didn’t work without sudo for me for some reason.
After the script finished I had some weird errors:
cp: cannot stat '/tmp/tmp.d4QjhW8T6k/docker-compose': No such file or directory
and docker context create ecs myecs
didn’t work at first, but once I tried with sudo it worked fine.
EDIT: . ~/.zshrc
(or just close your terminal and open a new one) made it possible for me to run docker context create ecs myecs
without sudo.