Last active
June 19, 2024 05:54
-
-
Save MayankFawkes/456a3ce98f691e922ed9d96e3bd4e49b to your computer and use it in GitHub Desktop.
Install docker in single script with latest 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
apt-get remove docker docker-engine docker.io containerd runc jq | |
apt-get update | |
apt-get -y install 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-get update | |
apt-get -y install docker-ce docker-ce-cli containerd.io | |
compose_version=$(curl https://api.github.com/repos/docker/compose/releases/latest | jq .name -r) | |
curl -L "https://github.com/docker/compose/releases/download/$compose_version/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
chmod +x /usr/local/bin/docker-compose | |
ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment