docs
docs copied to clipboard
ECS & ACI Documentation lacks instructions to enable Experimental features
Problem description
Documentation for both Amazon ECS & Azure ACI integration is missing step to properly setup for a Linux environment. I suspect this only impacts Linux, not Docker Desktop for Mac / Windows - but that is just an assumption.
The ECS documentation states you need the following requirements (emphasis mine):
Install the Docker Compose CLI on Linux
The Docker Compose CLI adds support for running and managing containers on ECS.
Install Prerequisites
Docker 19.03 or later
I did verify I had the latest release of both Docker & Docker Compose installed (see version information below).
If you follow the instructions for Linux, and you attempt to create a new context - the following error occurs:
mike@XPS-13-9360:~/projects/otel-collector$ docker context create ecs staging
"docker context create" requires exactly 1 argument.
See 'docker context create --help'.
Usage: docker context create [OPTIONS] CONTEXT
Create a context
In troubleshooting the problem, I found someone else who put in a ticket regarding this. I don't think the user's problem was well understood, as the ticket seems to have been closed without actually solving the underling problem.
https://github.com/docker/compose-cli/issues/847
It turns out, with the latest released version of the Docker CLI for Linux, you must enable experimental feature support in order to successfully create a ECS context.
To resolve the problem, I did the following:
- Configured experimental support
https://github.com/docker/cli/blob/master/experimental/README.md
- Restarted Docker Daemon
sudo systemctl restart docker
After this change, I was able to successfully create a ECS context:
mike@XPS-13-9360:~/projects/otel-collector$ docker context create ecs staging
? Create a Docker context using: [Use arrows to move, type to filter]
> An existing AWS profile
AWS secret and token credentials
AWS environment variables
Problem location
I couldn't find the information I wanted. I expected to find it near the following URL:
- https://docs.docker.com/engine/context/ecs-integration
- https://docs.docker.com/engine/context/aci-integration/
Project version(s) affected
mike@XPS-13-9360:~$ docker --version
Docker version 19.03.14, build 5eb3275d40
mike@XPS-13-9360:~$ docker-compose --version
docker-compose version 1.23.2, build 1110ad01
Suggestions for a fix
Please consider adding information about enabling experimental features within the documentation.
Is there anything else than enabling experimental mode in both the server and client required for docker context create ecs …
to work?
I am going crazy. I got it to work locally but now I'm trying to make it work on Gitlab CI, and, well:
Experimental: true on both client and server…
Same problem here with Azure, experimental features enabled. Version: 20.10.1 on Linux
docker context create aci azureaci
"docker context create" requires exactly 1 argument.
See 'docker context create --help'.
Usage: docker context create [OPTIONS] CONTEXT
Create a context
Same error for me on Ubuntu 20.04, with {"experimental": true} set:
The issue is still here on Linux with Docker version 20.10.5, regardless of the experimental flag
Anyone still having this issue, the solution here worked: https://github.com/docker/docker.github.io/issues/11949#issuecomment-778178431
Please make sure to reload your current shell session by closing/restarting all shell windows.
I had to completely uninstall Docker and reinstall it. I did not follow mjpowersjr
's solution. My Docker version is: Docker version 20.10.7, build f0df350
My Docker daemon json is:
{
"features": {
"buildkit": true
},
"experimental": false,
"builder": {
"gc": {
"enabled": true,
"defaultKeepStorage": "20GB"
}
}
}
My output of command docker context create ecs myecscontext
is:
➜ ~ docker context create ecs myecscontext
? Create a Docker context using: An existing AWS profile
? Select AWS Profile default
Successfully created ecs context "myecscontext"
For me, on Linux, I had to install "Docker Compose CLI", (which is different from "Docker Compose" and "Docker Compose V2"):
- https://docs.docker.com/cloud/ecs-integration/#install-the-docker-compose-cli-on-linux
- https://github.com/docker/compose-cli/blob/main/INSTALL.md
Then I had to exit and re-enter the shell to see the $ docker context create ecs myecscontext
command work successfully.
Anyone still having this issue, the solution here worked: #11949 (comment)
Please make sure to reload your current shell session by closing/restarting all shell windows.
I've already had the Docker Compose version v2.2.3
when I tried docker context create ecs myecscontext
. I installed the docker-compose again as you suggested and it worked. I checked the version and it was the same I was using before. I have no idea why it worked, but thank you.
For those on linux trying to get this to work with ECS:
-
enable
experimental
features in docker - restart the docker daemon (
systemctl restart docker
or the like) - install the docker compose-cli binary
- restart the docker daemon (for good measure)
- reinitialize the shell environment (easiest to exit from the current shell and create a new one)
[2022-10-05 12:55:59]» docker version
Client: Docker Engine - Community
Cloud integration: v1.0.29
Version: 20.10.18
API version: 1.41
Go version: go1.18.6
Git commit: b40c2f6
Built: Thu Sep 8 23:11:45 2022
OS/Arch: linux/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.18
API version: 1.41 (minimum version 1.12)
Go version: go1.18.6
Git commit: e42327a
Built: Thu Sep 8 23:09:37 2022
OS/Arch: linux/amd64
Experimental: true
containerd:
Version: 1.6.8
GitCommit: 9cd3357b7fd7218e4aec3eae239db1f68a5a6ec6
runc:
Version: 1.1.4
GitCommit: v1.1.4-0-g5fd4c4d
docker-init:
Version: 0.19.0
GitCommit: de40ad0
[2022-10-05 12:47:37]» docker context create ecs fooenv
? Create a Docker context using: An existing AWS profile
? Select AWS Profile yourprofile
Successfully created ecs context "fooenv"
There hasn't been any activity on this issue for a long time.
If the problem is still relevant, mark the issue as fresh with a /remove-lifecycle stale
comment.
If not, this issue will be closed in 14 days. This helps our maintainers focus on the active issues.
Prevent issues from auto-closing with a /lifecycle frozen
comment.
/lifecycle stale
Closed issues are locked after 30 days of inactivity. This helps our team focus on active issues.
If you have found a problem that seems similar to this, please open a new issue.
/lifecycle locked