Add 'custom-cmds-in-ubuntu/bin_examples/installing_docker_ubuntuserver.sh'

This commit is contained in:
sthope 2021-09-23 16:49:15 +02:00
parent 5e6f30590d
commit 4dda5fafc9

View File

@ -0,0 +1,31 @@
#!/bin/bash
###################################
############ by Sthope ############
###################################
### Installing Docker on Ubuntu Server with Docker-Compose (by LinuxServer)
sudo apt-get remove docker docker-engine docker.io containerd runc
sudo apt-get install -y apt-transport-https 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=amd64 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-get update
sudo apt-get upgrade -y
sudo apt-get install -y docker-ce docker-ce-cli containerd.io
sudo groupadd docker
sudo usermod -aG docker $USER
sudo curl -L --fail https://raw.githubusercontent.com/linuxserver/docker-docker-compose/master/run.sh -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo reboot