Created
May 11, 2021 10:55
-
-
Save knrt10/33897c1298847305b09a115cc29a9de3 to your computer and use it in GitHub Desktop.
Script to install docker in debian
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
set -x | |
# Source: https://docs.docker.com/engine/install/debian | |
apt-get update | |
apt-get -y remove docker docker-engine docker.io containerd runc || true | |
apt-get -y install \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
gnupg \ | |
lsb-release | |
curl -fsSL https://download.docker.com/linux/debian/gpg | 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/debian \ | |
$(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null | |
apt-get update | |
apt-get install docker-ce docker-ce-cli containerd.io |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment