Last active
June 17, 2022 09:29
-
-
Save muratgozel/eb61113d9fe25b74780d7d2a8f3095fb to your computer and use it in GitHub Desktop.
setup docker and docker-compose.
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
#!/usr/bin/env bash | |
apt install -y apt-transport-https ca-certificates curl gnupg lsb-release | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | 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 | |
apt update | |
apt install -y docker-ce docker-ce-cli containerd.io | |
/bin/cat <<EOM >/etc/docker/daemon.json | |
{ | |
"metrics-addr" : "127.0.0.1:9323", | |
"experimental" : true | |
} | |
EOM | |
sudo curl -L "https://github.com/docker/compose/releases/download/v2.6.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
sudo chmod +x /usr/local/bin/docker-compose | |
systemctl restart docker |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment