Skip to content

Instantly share code, notes, and snippets.

@niclaslindstedt
Created July 6, 2021 11:19
Show Gist options
  • Save niclaslindstedt/0b6ac5074ba019e02971fa7ae91c5c7e to your computer and use it in GitHub Desktop.
Save niclaslindstedt/0b6ac5074ba019e02971fa7ae91c5c7e to your computer and use it in GitHub Desktop.
Install Docker Engine on Ubuntu 20.04 systems
#!/bin/bash
main() {
sudo apt-get update \
&& sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg \
lsb-release \
&& curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg \
&& echo "deb [arch=amd64 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 > /dev/null \
&& sudo apt-get update \
&& sudo apt-get install docker-ce docker-ce-cli containerd.io
}
main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment