Skip to content

Instantly share code, notes, and snippets.

@bdnf
Last active October 31, 2020 16:14
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 bdnf/5566dd9631de3bea97b77b15456d759c to your computer and use it in GitHub Desktop.
Save bdnf/5566dd9631de3bea97b77b15456d759c to your computer and use it in GitHub Desktop.
Install Docker and Docker-Compose on EC2 (with User-Data script)
#! /bin/sh
yum update -y
amazon-linux-extras install docker
service docker start
usermod -a -G docker ec2-user
chkconfig docker on
sudo curl -L https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment