Last active
August 22, 2023 15:50
-
-
Save TyIsI/a5fe8052584f06e1d6d056380d689949 to your computer and use it in GitHub Desktop.
Install script to install Docker and Docker Compose based on the instructions from the website
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 | |
echo "Running initial update..." \ | |
&& sudo apt update \ | |
&& echo "Running system upgrades..." \ | |
&& sudo apt upgrade -y \ | |
&& echo "Installing dependencies..." \ | |
&& sudo apt install -y \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
gnupg-agent \ | |
software-properties-common \ | |
&& echo "Installing docker package keys" \ | |
&& curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - \ | |
&& echo "Verify the finger print:" \ | |
&& sudo apt-key fingerprint 0EBFCD88 \ | |
&& echo "Adding docker repository..." \ | |
&& sudo add-apt-repository \ | |
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \ | |
$(lsb_release -cs) \ | |
stable" \ | |
&& echo "Updating..." \ | |
&& sudo apt update \ | |
&& echo "Installing Docker..." \ | |
&& sudo apt install -y docker-ce docker-ce-cli containerd.io docker-ce-rootless-extras docker-buildx-plugin docker-compose-plugin \ | |
&& echo "Verifying install" \ | |
&& sudo docker run hello-world \ | |
&& echo "Installing docker-gc..." \ | |
&& sudo curl -L "https://gist.github.com/TyIsI/1aeb2981ceebd8f8d2203755c00d1c82/raw/5a953000da1e7e1c6a1e21d08598baa529fd1e14/docker-gc" -o /usr/local/bin/docker-gc \ | |
&& sudo chmod 755 /usr/local/bin/docker-gc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment