Last active
October 30, 2022 06:22
-
-
Save mohemohe/a8b7a3c910b235f31a25b653855fc91b to your computer and use it in GitHub Desktop.
install/update docker compose v2
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 -x | |
if [[ "${COMPOSE_VERSION}" == "" ]]; then | |
echo "must be set env 'COMPOSE_VERSION'" | |
exit 1 | |
fi | |
OS="$(uname -s | awk '{print tolower($0)}')" | |
ARCH="$(uname -m)" | |
mkdir -p /usr/local/lib/docker/cli-plugins | |
rm -f /usr/local/lib/docker/cli-plugins/docker-compose | |
curl -SL "https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-${OS}-${ARCH}" -o /usr/local/lib/docker/cli-plugins/docker-compose | |
chmod a+x /usr/local/lib/docker/cli-plugins/docker-compose |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
check versions: https://github.com/docker/compose/releases