Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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