Skip to content

Instantly share code, notes, and snippets.

@ephraimduncan
Created January 2, 2022 11:37
Show Gist options
  • Save ephraimduncan/b9c97936b040f3edd5de5452adf06c56 to your computer and use it in GitHub Desktop.
Save ephraimduncan/b9c97936b040f3edd5de5452adf06c56 to your computer and use it in GitHub Desktop.
Installing Docker on Ubuntu

Update your existing list of packages

sudo apt update

Install a few prerequisite packages

sudo apt install apt-transport-https ca-certificates curl gnupg2 software-properties-common

Add the Official Docker GPG Key

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

Add Docker Repo

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

Update the package database with the Docker packages

sudo apt update

Check for availability of Docker on the new repo

apt-cache policy docker-ce

Install Docker

sudo apt install docker-ce

Enable Docker to start on boot.

sudo systemctl status docker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment