Skip to content

Instantly share code, notes, and snippets.

@Byteflux
Last active November 1, 2021 17:26
Show Gist options
  • Save Byteflux/59ddba13cbcee40abad8807c32200696 to your computer and use it in GitHub Desktop.
Save Byteflux/59ddba13cbcee40abad8807c32200696 to your computer and use it in GitHub Desktop.
Install Docker Engine on Debian and Ubuntu

Install Docker Engine on Debian and Ubuntu

$ curl -sL https://git.io/JPaRT | sudo sh
#!/bin/sh
set -e
. /etc/os-release
apt-get update -y
apt-get install -y \
ca-certificates \
curl \
gnupg \
lsb-release
curl -fsSL https://download.docker.com/linux/$ID/gpg | \
gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo \
"deb [arch=$(dpkg --print-architecture)" \
"signed-by=/usr/share/keyrings/docker-archive-keyring.gpg]" \
"https://download.docker.com/linux/$ID" \
"$(lsb_release -cs) stable" | \
tee /etc/apt/sources.list.d/docker.list > /dev/null
apt-get update -y
apt-get install -y \
docker-ce \
docker-ce-cli \
containerd.io
curl \
-sL $(printf '%s' \
https://github.com/docker/compose/releases/download/ \
${DOCKER_COMPOSE_VERSION:-1.29.2}/docker-compose-linux-$(uname -m)) \
-o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment