Last active
May 24, 2018 07:43
-
-
Save momocow/2ab83c4ee513f8ec80c56fb6d08742be to your computer and use it in GitHub Desktop.
A boiler script for Ubuntu 16.04 (x86_64) to install Docker-ce.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
##################### | |
# OS: Ubuntu 16.04 # | |
# H/W: x86_64 # | |
##################### | |
# Uninstall old versions | |
sudo apt-get remove docker docker-engine docker.io | |
# Update the apt package index | |
sudo apt-get update | |
# Install packages to allow apt to use a repository over HTTPS | |
sudo apt-get install -y \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
software-properties-common | |
# Add Docker’s official GPG key | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
# Set up the stable repository | |
sudo add-apt-repository \ | |
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \ | |
$(lsb_release -cs) \ | |
stable" | |
# Update the apt package index again | |
sudo apt-get update | |
# Install Docker CE | |
sudo apt-get install -y docker-ce |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Install Docker CE with the following command.
Reference
https://docs.docker.com/install/linux/docker-ce/ubuntu