docker context create ecs myecs – requires exactly one argument

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.

Answer:

You need to install the Docker Compose CLI preview

The below curl is from here: Docker docs

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.

Leave a Reply