Skip to content

Instantly share code, notes, and snippets.

@kapitanluffy
Created January 25, 2019 11:02
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 kapitanluffy/12c34c07bca915facb93753829c6c095 to your computer and use it in GitHub Desktop.
Save kapitanluffy/12c34c07bca915facb93753829c6c095 to your computer and use it in GitHub Desktop.
Convenience script for installing docker in Ubuntu
#!/bin/bash
# Convenience script for installing docker in Ubuntu
#
# https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-using-the-repository
# https://docs.docker.com/install/linux/linux-postinstall/
apt-get update
apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
apt-key fingerprint 0EBFCD88
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
groupadd docker
usermod -aG docker $USER
apt-get update
apt-get install docker-ce
systemctl enable docker
echo -e "Reboot machine and execute 'docker run hello-world'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment