Last active
July 8, 2022 00:07
-
-
Save mihow/21116a999256d492b894cc23cffaf1af to your computer and use it in GitHub Desktop.
Install Docker on Ubuntu (Tested on 20.04 LTS Focal)
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 | |
set -o errexit | |
set -o nounset | |
set -o xtrace | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg | |
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \ | |
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list | |
sudo apt update | |
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-compose | |
sudo docker run hello-world | |
sudo usermod -aG docker $USER | |
newgrp docker | |
docker run hello-world |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment