Created
October 23, 2022 11:33
-
-
Save bdelphin/57af3fef35cbb8de4815c311d5663287 to your computer and use it in GitHub Desktop.
Docker & Docker Compose install script - Ubuntu/Debian
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 | |
# Install script for Docker & Docker Compose | |
# Tested on : | |
# - Ubuntu 20.04 | |
# colors | |
RED='\033[0;31m' | |
NC='\033[0m' | |
printf "\n${RED}Docker Install Script${NC}\n\n" | |
sudo apt update -y | |
sudo apt install -y ca-certificates curl gnupg lsb-release | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo 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/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null | |
sudo apt update -y | |
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin | |
sudo usermod -aG docker $USER | |
printf "\n${RED}Docker engine & compose installation completed !\nIn order to use docker commands with your regular user, you should log out and log back in.${NC}\n\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment