Skip to content

Instantly share code, notes, and snippets.

@arevindh
Created June 21, 2022 14:37
Show Gist options
  • Save arevindh/ec4628a9dc9630184bb4e1c76472dc36 to your computer and use it in GitHub Desktop.
Save arevindh/ec4628a9dc9630184bb4e1c76472dc36 to your computer and use it in GitHub Desktop.
Install docker compose
#!/bin/bash
# Docker Compose
compose_release() {
curl --silent "https://api.github.com/repos/docker/compose/releases/latest" |
grep -Po '"tag_name": "\K.*?(?=")'
}
if ! [ -x "$(command -v docker-compose)" ]; then
curl -L https://github.com/docker/compose/releases/download/$(compose_release)/docker-compose-$(uname -s)-$(uname -m) \
-o /usr/local/bin/docker-compose && chmod +x /usr/local/bin/docker-compose
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment