Created
April 26, 2018 10:29
-
-
Save jcb91/bc8384c4e9309ddfbf08085017e91b37 to your computer and use it in GitHub Desktop.
install docker on ubuntu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Uninstall old versions | |
sudo apt-get remove docker docker-engine docker.io | |
# Install packages to allow apt to use a repository over HTTPS | |
sudo apt-get update | |
sudo apt-get install \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
software-properties-common | |
# SET UP THE REPOSITORY | |
# Add Docker’s official GPG key: | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
# check fingerprint | |
sudo apt-key fingerprint 0EBFCD88 | |
# add stable repo | |
sudo add-apt-repository \ | |
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \ | |
$(lsb_release -cs) \ | |
stable" | |
# install docker ce | |
sudo apt-get update | |
sudo apt-get install docker-ce | |
# check it worked: | |
sudo docker run hello-world |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment