Skip to content

Instantly share code, notes, and snippets.

@devopsy-ir
Last active August 2, 2021 07:41
Show Gist options
  • Save devopsy-ir/b13f06afa659f28ca08ed0ef2964db40 to your computer and use it in GitHub Desktop.
Save devopsy-ir/b13f06afa659f28ca08ed0ef2964db40 to your computer and use it in GitHub Desktop.
#Install docker-compose dynamically. Official installing way [https://docs.docker.com/compose/install/] need version obtained by your hands. But I wrote a script which obtain the latest version for you automatically.
export docker_compose_latest=$(curl -Ls -o /dev/null -w %{url_effective} https://github.com/docker/compose/releases/latest | grep -o '[^/]*$')
curl -L "https://github.com/docker/compose/releases/download/${docker_compose_latest}/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment