Skip to content

Instantly share code, notes, and snippets.

@momocow
Last active May 24, 2018 07:43
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 momocow/2ab83c4ee513f8ec80c56fb6d08742be to your computer and use it in GitHub Desktop.
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.
#!/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
@momocow
Copy link
Author

momocow commented May 24, 2018

Install Docker CE with the following command.

curl -sL "https://gist.githubusercontent.com/momocow/2ab83c4ee513f8ec80c56fb6d08742be/raw/docker-ce-install.sh" | sudo bash -

Reference
https://docs.docker.com/install/linux/docker-ce/ubuntu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment