Skip to content

Instantly share code, notes, and snippets.

@spdin
Last active January 29, 2020 06:30
Show Gist options
  • Save spdin/b56f276c56337763e788d27ddf3edb64 to your computer and use it in GitHub Desktop.
Save spdin/b56f276c56337763e788d27ddf3edb64 to your computer and use it in GitHub Desktop.
Install Docker on Ubuntu-16.04
# add the GPG key for the official Docker repository to the system
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# add the Docker repository to APT sources
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
# update the package database with the Docker packages from the newly added repo
sudo apt-get update
# install from the Docker repo instead of the default Ubuntu 16.04 repo
apt-cache policy docker-ce
# install docker
sudo apt-get install -y docker-ce
# check if the docker daemon is running
sudo systemctl status docker
# add user to docker group
sudo usermod -aG docker ${USER}
su - ${USER}
id -nG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment