Skip to content

Instantly share code, notes, and snippets.

@baseboxorg
Forked from techiesathya/ubuntu_docker.sh
Last active March 29, 2018 17:32
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 baseboxorg/5164ad2b5a687005ef3be2960340614b to your computer and use it in GitHub Desktop.
Save baseboxorg/5164ad2b5a687005ef3be2960340614b to your computer and use it in GitHub Desktop.
Installing docker in Ubuntu
#!/bin/bash
# based on tutorial: https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/#install-using-the-repository
sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
# Command to add GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# Command to add docker repository to APT source
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
# Update package database
sudo apt-get update
# Command to install from Docker repo instead of Ubuntu repo
# apt-cache policy docker-ce
# Command to install docker
sudo apt-get install -y docker-ce
# sudo groupadd docker
# sudo usermod -aG docker ${USER}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment