Last active
December 12, 2021 05:03
-
-
Save danielyewright/f4f3b9fa421fc99a46454c9179a00941 to your computer and use it in GitHub Desktop.
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/bash | |
# update package index and install packages to allow repos over https | |
sudo apt update | |
sudo apt install ca-certificates curl gnupg lsb-release -y | |
# add docker gpg key | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg | |
# setup stable repo | |
echo \ | |
"deb [arch=$(dpkg --print-architecture) 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 | |
# install docker engine | |
sudo apt update | |
sudo apt-get install docker-ce docker-ce-cli containerd.io -y | |
# download current stable release of docker compose | |
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
# apply executable permissions to binary | |
sudo chmod +x /usr/local/bin/docker-compose | |
# give current user rights to run docker without sudo | |
sudo usermod -aG docker $USER |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment