Skip to content

Instantly share code, notes, and snippets.

@stlehmann
Last active February 23, 2019 09:25
Show Gist options
  • Save stlehmann/621f6071389479a1a40a46b5f6905f07 to your computer and use it in GitHub Desktop.
Save stlehmann/621f6071389479a1a40a46b5f6905f07 to your computer and use it in GitHub Desktop.
Installation script for docker on Debian
apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg2 \
software-properties-common
curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
if apt-key finger | grep -q "0EBF CD88"; then
add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/debian \
$(lsb_release -cs) \
stable"
apt-get update
apt-get install -y docker-ce
docker run hello-world;
else
echo "Docker fingerprint was not found."
exit 1;
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment