Created
May 3, 2021 07:48
-
-
Save kwikwag/cc4e768d58e17f91bbccdc4bb6dc8556 to your computer and use it in GitHub Desktop.
Install Docker on Ubuntu/Debian
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 | |
# based on https://docs.docker.com/engine/install/debian/ | |
# and https://docs.docker.com/engine/install/ubuntu/ | |
# at 2021-05-03 | |
dist=$(lsb_release --id --short | awk '{ print tolower($0) }') | |
: : : Set up the Docker repository && \ | |
sudo apt update && \ | |
sudo apt -y install \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
gnupg \ | |
lsb-release && \ | |
curl -fsSL https://download.docker.com/linux/${dist}/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg && \ | |
echo \ | |
"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/${dist} \ | |
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null && \ | |
: : : Install Docker && \ | |
sudo apt update && \ | |
sudo apt -y install docker-ce docker-ce-cli containerd.io |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment