Skip to content

Instantly share code, notes, and snippets.

@dkarchmer
Last active January 19, 2023 10:59
Show Gist options
  • Save dkarchmer/4245eded2916e070d8502138e3135c2a to your computer and use it in GitHub Desktop.
Save dkarchmer/4245eded2916e070d8502138e3135c2a to your computer and use it in GitHub Desktop.
Installing Docker Compose on Ubuntu to run from ECR docker repos

Ubuntu 19.10 with Docker Compose

Installing Ubuntu 19.10 with latest docker, docker-compose.

Install Ubuntu

Install latest Ubuntu 19.10 and then upgrade to latest

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install curl python3.7 python-venv

Installing Docker

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo bash -c 'echo "deb [arch=amd64] https://download.docker.com/linux/ubuntu disco stable" > /etc/apt/sources.list.d/docker-ce.list'
sudo apt-get update
apt-cache policy docker-ce
sudo apt-get install -y docker-ce
sudo systemctl status docker

Create Docker Group

To avoid having to use sudo, do:

sudo usermod -aG docker ${USER}
su ${USER}
id -nG

Test

docker run hello-world

Install docker-compose

sudo curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose --version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment