Skip to content

Instantly share code, notes, and snippets.

@pravj
Created July 8, 2018 07:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pravj/6396ffaf75f4da55db5daf2dd6b09779 to your computer and use it in GitHub Desktop.
Save pravj/6396ffaf75f4da55db5daf2dd6b09779 to your computer and use it in GitHub Desktop.
Shell script to setup Docker Community Edition on an Ubuntu:16.04
#
# Setup the Docker repository
#
echo "update apt package index"
sudo apt-get update
echo "allow apt to use HTTPS"
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
echo "add official docker GPG key"
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
echo "verify the key"
sudo apt-key fingerprint 0EBFCD88
echo "setup stable repository"
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
#
# Install Docker CE
#
echo "update apt package index"
sudo apt-get update
echo "install latest version of Docker CE"
sudo apt-get install docker-ce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment