Skip to content

Instantly share code, notes, and snippets.

@brianlechthaler
Last active June 30, 2019 05:01
Show Gist options
  • Save brianlechthaler/93c50e27988d4f5c2187f7f8d6a1f602 to your computer and use it in GitHub Desktop.
Save brianlechthaler/93c50e27988d4f5c2187f7f8d6a1f602 to your computer and use it in GitHub Desktop.
Docker CE Install Script
#!/bin/bash
echo "This script will install Docker CE."
echo "Press any key to continue."
read -n 1
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common -y
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install docker-ce -y
apt-cache madison docker-ce
sudo usermod -aG docker $USER
sudo docker run hello-world
sudo groupadd docker
sudo usermod -aG docker $USER
echo "Log out and log back in to run docker without root"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment