Skip to content

Instantly share code, notes, and snippets.

@imrodrigoalves
Forked from dhavaln/install_docker_ec2.sh
Last active October 3, 2023 14:40
Show Gist options
  • Save imrodrigoalves/f1e77ac62ff79cecc64e4bff10b44288 to your computer and use it in GitHub Desktop.
Save imrodrigoalves/f1e77ac62ff79cecc64e4bff10b44288 to your computer and use it in GitHub Desktop.
Install Docker on EC2
#! /bin/sh
sudo yum update -y
sudo yum install docker -y
sudo usermod -a -G docker ec2-user
sudo id ec2-user
sudo newgrp docker
wget https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)
sudo mv docker-compose-$(uname -s)-$(uname -m) /usr/local/bin/docker-compose
sudo chmod -v +x /usr/local/bin/docker-compose
sudo systemctl enable docker.service
sudo systemctl start docker.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment