Skip to content

Instantly share code, notes, and snippets.

@brunomarks7
Created July 16, 2022 00:57
Show Gist options
  • Save brunomarks7/b439924ddb49afe3757caf6fd7e0ec65 to your computer and use it in GitHub Desktop.
Save brunomarks7/b439924ddb49afe3757caf6fd7e0ec65 to your computer and use it in GitHub Desktop.
Install Docker and Docker Compose - Amazon Linux 2 instance
#!/bin/bash
yum update -y
amazon-linux-extras install docker -y
service docker start
usermod -a -G docker ec2-user
chkconfig docker on
yum install -y git
curl -L https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
docker-compose version
reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment