Skip to content

Instantly share code, notes, and snippets.

@satishbabariya
Last active March 24, 2022 14:32
Show Gist options
  • Save satishbabariya/65756c5ed00875ab59c0c92f0c6e0be6 to your computer and use it in GitHub Desktop.
Save satishbabariya/65756c5ed00875ab59c0c92f0c6e0be6 to your computer and use it in GitHub Desktop.
Docker & Docker Compose Install Script
# Docker & Docker Compose will need to be installed on the machine
# curl -fsSL https://get.docker.com -o /tmp/get-docker.sh
# sh /tmp/get-docker.sh
# curl -L "https://github.com/docker/compose/releases/download/v2.2.3/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
# chmod 755 /usr/local/bin/docker-compose
# sudo systemctl enable docker
# sudo usermod -aG docker $USER
# sudo chmod 666 /var/run/docker.sock
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 curl -L "https://github.com/docker/compose/releases/download/v2.2.3/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod 755 /usr/local/bin/docker-compose
@satishbabariya
Copy link
Author

sudo amazon-linux-extras install docker
sudo service docker start
sudo usermod -a -G docker ec2-user
sudo chkconfig docker on
sudo yum install -y git
curl -L "https://github.com/docker/compose/releases/download/v2.2.3/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod 755 /usr/local/bin/docker-compose

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment