Created
April 2, 2025 23:06
-
-
Save asimzeeshan/91afc75bf06e7a113721e03903419be7 to your computer and use it in GitHub Desktop.
Install latest docker-compose using Linux CLI
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
# ============================================================ | |
# Download and install latest release | |
# ============================================================ | |
get_latest_release() { | |
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api | |
grep '"tag_name":' | # Get tag line | |
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value | |
} | |
curl -L https://github.com/docker/compose/releases/download/`get_latest_release "docker/compose"`/docker-compose-`uname -s`-`uname -m` -o /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