Last active
June 9, 2020 00:46
-
-
Save kawaz/5373aaeb6389e6f05af49c16304bd842 to your computer and use it in GitHub Desktop.
install 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
#!/bin/bash | |
set -e | |
set -o pipefail | |
[[ -x /usr/bin/docker-compose ]] && exit | |
if ! [[ -f /usr/bin/docker-compose ]]; then | |
t=$(mktemp) | |
curl -sLo "$t" "$(curl -s https://api.github.com/repos/docker/compose/releases/latest | jq -r '.assets[].browser_download_url' | grep "/docker-compose-$(uname -s)-$(uname -m)$")" | |
chmod 755 "$t" | |
mv "$t" /usr/local/bin/docker-compose | |
fi | |
if ! [[ -f /usr/bin/docker-compose ]]; then | |
ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment