Skip to content

Instantly share code, notes, and snippets.

@moinsam
Last active August 4, 2021 04:41
Show Gist options
  • Save moinsam/bdbc23391ab0140fb590b528ec20f81f to your computer and use it in GitHub Desktop.
Save moinsam/bdbc23391ab0140fb590b528ec20f81f to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# Step 1 — Installing Docker
sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
sudo apt update
apt-cache policy docker-ce
sudo apt install docker-ce
# Step 2 - Post Installation
# 1. Create the docker group.
$ sudo groupadd docker
# 2. Add your user to the docker group.
$ sudo usermod -aG docker $USER
# 3. Log out and log back in so that your group membership is re-evaluated.
# 4. Verify that you can run docker commands without sudo.
$ docker run hello-world
# https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-20-04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment