Last active
August 21, 2022 00:31
-
-
Save asowder3943/ebccf44bb4196aa65217dc62b6a2e782 to your computer and use it in GitHub Desktop.
Installing Docker on Debian (Linode Deployment)
This file contains 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 | |
# | |
# Docker installation Script created using instruction from | |
# https://docs.docker.com/engine/install/debian/ | |
# | |
# Uninstall old versions | |
sudo apt-get -y remove docker docker-engine docker.io containerd runc | |
# Set up the repository | |
# Update the apt package index and install packages to allow | |
# apt to use a repository over HTTPS: | |
sudo apt-get update | |
sudo apt-get -y install \ | |
ca-certificates \ | |
curl \ | |
gnupg \ | |
lsb-release | |
# Add Docker’s official GPG key: | |
sudo mkdir -p /etc/apt/keyrings | |
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg | |
# Use the following command to set up the repository: | |
echo \ | |
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \ | |
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null | |
# Install Docker Engine | |
sudo apt-get update | |
sudo apt-get -y install docker-ce docker-ce-cli containerd.io docker-compose-plugin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment