Skip to content

Instantly share code, notes, and snippets.

@ps-george
Created March 13, 2019 09:25
Show Gist options
  • Save ps-george/b9d828f49bc22c0f3bd38c154d911c02 to your computer and use it in GitHub Desktop.
Save ps-george/b9d828f49bc22c0f3bd38c154d911c02 to your computer and use it in GitHub Desktop.
Install Docker
# from https://docs.docker.com/install/linux/docker-ce/ubuntu/
sudo apt-get update
# Install packages to allow apt to use a repository over HTTPS
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
# Add docker's official GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# Verify that you now have the key with the fingerprint
# 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88
# by searching for the last 8 characters of the fingerprint.
sudo apt-key fingerprint 0EBFCD88
echo -e "Verify fingerprint is:\n\t9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88"
echo -e "[y/n]?"
read -n 1 -r
if [[ $REPLY =~ ^[Yy]$ ]]
then
# Add the stable repository to the package index
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
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment