Skip to content

Instantly share code, notes, and snippets.

@felipebizz
Created March 10, 2017 22:03
Show Gist options
  • Save felipebizz/e0431cff8ed37be3a107b9656328cddc to your computer and use it in GitHub Desktop.
Save felipebizz/e0431cff8ed37be3a107b9656328cddc to your computer and use it in GitHub Desktop.
Latest Version Docker Compose
#!/bin/bash
# get latest docker compose released tag
COMPOSE_VERSION=$(curl -s https://api.github.com/repos/docker/compose/releases/latest | grep 'tag_name' | cut -d\" -f4)
# Install docker-compose
sh -c "curl -L https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose"
chmod +x /usr/local/bin/docker-compose
sh -c "curl -L https://raw.githubusercontent.com/docker/compose/${COMPOSE_VERSION}/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose"
# Output compose version
docker-compose -v
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment