Last active
November 7, 2018 16:48
-
-
Save knutole/3fd359807b8bcb27b36ca75ddd262230 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
#!/bin/bash | |
# https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-docker-ce | |
# Update the apt package index: | |
sudo apt-get update | |
# Install packages to allow apt to use a repository over HTTPS: | |
sudo apt-get install -y \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
software-properties-common | |
# Add Docker’s official GPG key: | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
# Verify that you now have the key with the fingerprint 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88: | |
sudo apt-key fingerprint 0EBFCD88 | |
# Use the following command to set up the stable repository: | |
sudo add-apt-repository \ | |
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \ | |
$(lsb_release -cs) \ | |
stable" | |
# Update the apt package index: | |
sudo apt-get update | |
# Install the latest version of Docker CE: | |
sudo apt-get install -y docker-ce | |
# Install Docker Compose | |
sudo curl -L "https://github.com/docker/compose/releases/download/1.23.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
sudo chmod +x /usr/local/bin/docker-compose |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment