Skip to content

Instantly share code, notes, and snippets.

@asolera
Last active June 3, 2022 19:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save asolera/9045f6fdab629e0451b3eef37102a813 to your computer and use it in GitHub Desktop.
Save asolera/9045f6fdab629e0451b3eef37102a813 to your computer and use it in GitHub Desktop.
Docker install on Amazon Linux 2 (AMI)

I've created this document just in case the original one (https://gist.github.com/npearce/6f3c7826c7499587f00957fee62f8ee9) get deleted.

sudo yum update -y
sudo amazon-linux-extras install docker -y
sudo service docker start
sudo usermod -a -G docker ec2-user
sudo chkconfig docker on
sudo yum install -y git
sudo reboot

Docker-compose:

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