Skip to content

Instantly share code, notes, and snippets.

@alincc
Forked from amitavroy/docker_on_ubuntu.sh
Created December 4, 2021 08:54
Show Gist options
  • Save alincc/eb525d4a476885a743a224da31a5bf81 to your computer and use it in GitHub Desktop.
Save alincc/eb525d4a476885a743a224da31a5bf81 to your computer and use it in GitHub Desktop.
Installing Docker on a new Ubuntu Server
sudo apt update
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
sudo groupadd docker
sudo usermod -aG docker $USER
sudo curl -L https://github.com/docker/compose/releases/download/1.21.0/docker-compose-`uname -s`-`uname -m` | sudo tee /usr/local/bin/docker-compose > /dev/null
sudo chmod +x /usr/local/bin/docker-compose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment