Created
September 4, 2024 03:41
-
-
Save elinardo10/e82f0057b47e3b44edd34253770204b0 to your computer and use it in GitHub Desktop.
Instalando docker e docker composer
This file contains 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# | |
# Recipe Name: Install Docker and Docker-Compose | |
# Run as user: root | |
# Recipe: | |
sudo apt update | |
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
# Focal = Ubuntu 22 | |
# Run `lsb_release -cs` to discover yours if not 22 | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable" | |
apt-cache policy docker-ce | |
apt install -y docker-ce | |
systemctl status docker | |
usermod -aG docker forge | |
COMPOSE_VERSION=$(curl -s https://api.github.com/repos/docker/compose/releases/latest | grep 'tag_name' | cut -d\" -f4) | |
sh -c "curl -L https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose" | |
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