Skip to content

Instantly share code, notes, and snippets.

@KenyOS
Forked from Jeiwan/lightsail-docker.sh
Created April 5, 2021 14:17
Show Gist options
  • Save KenyOS/db8d96141d6ede173f43f7353e7346f7 to your computer and use it in GitHub Desktop.
Save KenyOS/db8d96141d6ede173f43f7353e7346f7 to your computer and use it in GitHub Desktop.
Auto-Install Docker and Docker Compose on AWS Lightsail
sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
sudo apt-get update
sudo apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
sudo apt-get install -y docker-engine
sudo curl -L "https://github.com/docker/compose/releases/download/1.9.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo groupadd docker
sudo usermod -aG docker $USER
sudo service docker start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment