Skip to content

Instantly share code, notes, and snippets.

@cardboardcode
Last active May 20, 2026 13:18
Show Gist options
  • Select an option

  • Save cardboardcode/764042646eddb7380fac5dca3998c131 to your computer and use it in GitHub Desktop.

Select an option

Save cardboardcode/764042646eddb7380fac5dca3998c131 to your computer and use it in GitHub Desktop.
For People In A Hurry: How To Install Docker on Linux
image

Note

This guide is a copy-paste-observe list of quick instructional steps on how to set up Docker quickly without wasting any cognitive energy.

Instructions 📘

Run these commands to update your system and install prerequisite packages needed for adding Docker’s official repository and signing keys:

sudo apt-get update -y
sudo apt-get install ca-certificates curl -y
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

Run this command to add Docker’s official APT repository to your system sources list:

echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
  $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

Run these commands to refresh your package list and install Docker Engine along with CLI tools and plugins:

sudo apt-get update -y
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

Run these commands to create the Docker user group and add your current user to it so Docker can be run without sudo:

sudo groupadd docker
sudo gpasswd -a $USER docker

Run this command to reboot your system so group permissions and Docker installation changes take effect:

sudo reboot

Verify ✔️

Run docker ps below and you should see something similar below in your terminal:

CONTAINER ID   IMAGE                                COMMAND                  CREATED        STATUS                    PORTS                                                   NAMES
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment