Skip to content

Instantly share code, notes, and snippets.

@testanull
Created September 7, 2023 02:53
Show Gist options
  • Save testanull/13fb021f0c6ba62483afa4c204e68d84 to your computer and use it in GitHub Desktop.
Save testanull/13fb021f0c6ba62483afa4c204e68d84 to your computer and use it in GitHub Desktop.
Install docker && docker-compose on Ubuntu 20.04
#!/bin/bash
sudo su
wget -qO- https://get.docker.com/ | sh
COMPOSE_VERSION=`git ls-remote https://github.com/docker/compose | grep refs/tags | grep -oE "[0-9]+\.[0-9][0-9]+\.[0-9]+$" | sort --version-sort | tail -n 2 | head -n 1`
sudo sh -c "curl -L https://github.com/docker/compose/releases/download/v${COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose"
sudo chmod +x /usr/local/bin/docker-compose
# You're good to go, no more 404 not found!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment