Skip to content

Instantly share code, notes, and snippets.

@pastranastevenaz
Last active June 11, 2019 09:01
Show Gist options
  • Save pastranastevenaz/1388169eb817095074953e77e34c4390 to your computer and use it in GitHub Desktop.
Save pastranastevenaz/1388169eb817095074953e77e34c4390 to your computer and use it in GitHub Desktop.
The commands to innstall docker on Ubuntu 18.04
#!bin/bash
#add repo gpg key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
#add the repo
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
#update repos
sudo apt-get update
#install the docker software
sudo apt-get install -y docker-ce=18.06.1~ce~3-0~ubuntu
#prevent docker from updating
sudo apt-mark hold docker-ce
#You can verify that docker is working by running this command:
sudo docker version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment