Last active
March 24, 2022 14:32
-
-
Save satishbabariya/65756c5ed00875ab59c0c92f0c6e0be6 to your computer and use it in GitHub Desktop.
Docker & Docker Compose Install Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
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
Amazon changed the install in Linux 2. One no-longer using 'yum'
See: https://aws.amazon.com/amazon-linux-2/release-notes/
Docker CE Install
Make docker auto-start
sudo chkconfig docker on
Because you always need it....
sudo yum install -y git
Reboot to verify it all loads fine on its own.
sudo reboot