Skip to content

Instantly share code, notes, and snippets.

@abinhho
Last active September 20, 2021 14:09
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 abinhho/6c60b75799a3b06fc956629aea529d9c to your computer and use it in GitHub Desktop.
Save abinhho/6c60b75799a3b06fc956629aea529d9c to your computer and use it in GitHub Desktop.
Install docker and git on EC2 instance

Install git

sudo yum update  -y
sudo yum install git  -y
git version

Install docker

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

Install docker compose

sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/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