Created
May 2, 2019 14:39
-
-
Save jmaitrehenry/224357addc79b8929106a2ff8f3d434a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/bin/bash | |
# On error exit | |
set -e | |
# Update package definitions | |
apt-get update | |
# Allow apt (the package manager) to use repository over HTTPS | |
apt-get install \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
gnupg-agent \ | |
software-properties-common | |
# Add Docker’s official GPG key | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - | |
# Add Docker stable repository | |
add-apt-repository \ | |
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \ | |
$(lsb_release -cs) \ | |
stable" | |
# Install Docker | |
apt-get update | |
apt-get install docker-ce docker-ce-cli containerd.io | |
# Verify that Docker is installed correctly | |
docker run hello-world |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment