Last active
January 4, 2022 16:24
-
-
Save nicosingh/69cc5dfdb6fd1b5ca590d4d830e2e884 to your computer and use it in GitHub Desktop.
Install Docker Ubuntu 18 server on EC2
This file contains hidden or 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
#!/bin/bash | |
apt-get update -y | |
apt-get install \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
software-properties-common -y | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - | |
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | |
apt-get update -y | |
apt-get install docker-ce -y | |
usermod -aG docker ubuntu | |
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 swarm init --advertise-addr $(curl http://169.254.169.254/latest/meta-data/local-ipv4) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment