Skip to content

Instantly share code, notes, and snippets.

@puilp0502
Last active February 16, 2021 15:34
Show Gist options
  • Save puilp0502/818dcc5bf3257671372fd865cc861ff2 to your computer and use it in GitHub Desktop.
Save puilp0502/818dcc5bf3257671372fd865cc861ff2 to your computer and use it in GitHub Desktop.
Docker installation script
#!/bin/sh
# Docker CE Installation Script
# Based on https://docs.docker.com/install/linux/docker-ce/ubuntu
# Uninstall old versions
sudo apt-get remove docker docker-engine docker.io containerd runc
# Setup the repositories
sudo apt-get update
sudo apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
echo "Fingerprint should be: 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88"
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
# Install Docker Engine
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment