Last active
April 4, 2023 12:22
-
-
Save SalihKARAHAN/2476e732dd0142de2a56b9fc7a2ead4c to your computer and use it in GitHub Desktop.
This scrip is useful to install docker on ubuntu 20.04 LTS.
This file contains hidden or 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/sh | |
# It would be outdated after a while | |
# This file created at 2023.04.03 by Salih KARAHAN <[email protected]> | |
# Install docker (follow steps at the link https://docs.docker.com/engine/install/ubuntu/) | |
sudo apt-get update && sudo apt-get -y upgrade | |
sudo apt-get update | |
sudo apt-get install \ | |
ca-certificates \ | |
curl \ | |
gnupg | |
sudo mkdir -m 0755 -p /etc/apt/keyrings | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /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 chmod a+r /etc/apt/keyrings/docker.gpg | |
sudo apt-get update | |
sudo apt-get -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin | |
# update docker compose plugin manually | |
# https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-compose-on-ubuntu-22-04 | |
mkdir -p ~/.docker/cli-plugins/ | |
# https://github.com/docker/compose/releases | |
curl -SL https://github.com/docker/compose/releases/download/v2.17.2/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose | |
sudo chmod 666 /var/run/docker.sock |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment