Skip to content

Instantly share code, notes, and snippets.

@nicolasramy
Last active August 10, 2021 15:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nicolasramy/68da74d000a7f395ed35dad86ab2892f to your computer and use it in GitHub Desktop.
Save nicolasramy/68da74d000a7f395ed35dad86ab2892f to your computer and use it in GitHub Desktop.
Simple setup script to install Docker Community Edition on Ubuntu Server 20.04 LTS

Docker installation

Simple setup script to install Docker Community Edition on Ubuntu Server 20.04 LTS

sudo apt update
sudo apt install -y apt-transport-https \
                    ca-certificates \
                    curl \
                    gnupg \
                    lsb-release

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
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 add-apt-repository \
       "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
       $(lsb_release -cs) \
       stable"

sudo apt update

sudo apt install -y docker-ce docker-ce-cli containerd.io

sudo python3 -m "pip install docker-compose"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment