Skip to content

Instantly share code, notes, and snippets.

@mauromarano
Created July 4, 2023 09:10
Show Gist options
  • Save mauromarano/0c90b246d31b71de1c413e812dc787e7 to your computer and use it in GitHub Desktop.
Save mauromarano/0c90b246d31b71de1c413e812dc787e7 to your computer and use it in GitHub Desktop.
Quick install docker on ubuntu server
#!/bin/bash
# curl -s https://gist.githubusercontent.com/gagginaspinnata/0c90b246d31b71de1c413e812dc787e7/raw/569fe2a9ea2fdc211ba0d82e47f040709f76ad5a/docker_quick_install.sh | bash
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment