Skip to content

Instantly share code, notes, and snippets.

@gofer
Created May 28, 2025 10:38
Show Gist options
  • Save gofer/5b2f224c54327a512e707317d18c2559 to your computer and use it in GitHub Desktop.
Save gofer/5b2f224c54327a512e707317d18c2559 to your computer and use it in GitHub Desktop.
Download docker-compose
#!/usr/bin/bash
BASEDIR=/usr/local/libexec/docker
CLI_PLUGINS_DIR=${BASEDIR}/cli-plugins
DOCKER_COMPOSE_BINARY_URL_BASE='https://github.com/docker/compose/releases/download'
DOCKER_COMPOSE_BINARY_FILE_NAME="docker-compose-$(uname -s | tr '[:upper:]' '[:lower:]')-$(uname -m | tr '[:upper:]' '[:lower:]')"
DOCKER_COMPOSE_VERSION=2.36.2
DOCKER_COMPOSE_BINARY_URL=${DOCKER_COMPOSE_BINARY_URL_BASE}/v${DOCKER_COMPOSE_VERSION}/${DOCKER_COMPOSE_BINARY_FILE_NAME}
CURL=curl
if [ -f ${CLI_PLUGINS_DIR}/docker-compose ]; then
rm -f ${CLI_PLUGINS_DIR}/docker-compose
fi
${CURL} -Lo ${CLI_PLUGINS_DIR}/docker-compose ${DOCKER_COMPOSE_BINARY_URL}
chmod +x ${CLI_PLUGINS_DIR}/docker-compose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment