Skip to content

Instantly share code, notes, and snippets.

@mihirs16
Created September 8, 2022 14:55
Show Gist options
  • Save mihirs16/2301c1fb68de4763f5c951802a6d5b28 to your computer and use it in GitHub Desktop.
Save mihirs16/2301c1fb68de4763f5c951802a6d5b28 to your computer and use it in GitHub Desktop.
Installing Docker on Ubuntu 20.04 (probably similar process with a different repository for newer versions).
#!/usr/bin/env bash
# update list of packages
apt update
# https prerequisites for apt
apt install apt-transport-https ca-certificates curl software-properties-common
# add GPG key for official docker repository
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# add docker repository to apt sources
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
# check for docker repository download URLs
apt-cache policy docker-ce
# install docker
apt install docker-ce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment