Skip to content

Instantly share code, notes, and snippets.

@kawaz
Last active June 9, 2020 00:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kawaz/5373aaeb6389e6f05af49c16304bd842 to your computer and use it in GitHub Desktop.
Save kawaz/5373aaeb6389e6f05af49c16304bd842 to your computer and use it in GitHub Desktop.
install docker-compose
#!/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