Home > Blockchain >  Docker context types (ECS), is it possible?
Docker context types (ECS), is it possible?

Time:09-25

So I'm trying to use Docker contexts to deploy stuff in ECS seamlessly.

Yet the commands that are described here and here (docker context create ecs contextname) don't work. The version of docker I've got installed is the latest and the manual clearly doesn't include anything regarding "context types" or ECS.

Are such articles outdated or ahead of time? I really don't get it

CodePudding user response:

What "Docker" are you using? The Cloud Integration piece is available out of the box in the latest releases of Docker Desktop (for both Mac and Windows). Nothing else should be required.

For Docker Engine for Linux you have to add that support following these steps. There is a script for Ubuntu in the repo and this is my own script I use with Amazon Linux 2 (on Cloud9):

# Source instructions: https://github.com/docker/compose-cli/blob/main/INSTALL.md 

# Grab the new docker binary
curl -L -O https://github.com/docker/compose-cli/releases/download/v1.0.17/docker-linux-amd64
mv docker-linux-amd64 docker
chmod  x docker

# Create a link to the old docker binary 
sudo ln -s /usr/bin/docker /usr/local/bin/com.docker.cli

# Check that it works with the new docker CLI
./docker --context default ps

# Move the new docker CLI to a directory in PATH (with precedence over the old CLI)
sudo mv docker /usr/local/bin/docker

# Reload the bash for changes to take effect 
bash

# Check the docker version 
docker version

I haven't played much with the Linux version of the integration, I worked mostly with the Docker Desktop one (which would be my suggestion).

  • Related