Skip to content

Instantly share code, notes, and snippets.

@jaybuidl
Last active January 16, 2018 08:30
Show Gist options
  • Save jaybuidl/f3decf4fcc049461cd187921da640bca to your computer and use it in GitHub Desktop.
Save jaybuidl/f3decf4fcc049461cd187921da640bca to your computer and use it in GitHub Desktop.
update docker-compose and its auto-completion to the latest release version (not installed as a container!)
#!/bin/bash
latestReleaseUrl="$(curl -s https://api.github.com/repos/docker/compose/releases/latest | grep "docker-compose-Linux-x86_64\"" | grep browser_download_url | sed "s/.*\(https.*x86_64\).*/\1/")"
echo "installing $latestReleaseUrl"
sudo curl -L $latestReleaseUrl -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose version
sudo curl -L https://raw.githubusercontent.com/docker/compose/$(docker-compose version --short)/contrib/completion/bash/docker-compose -o /etc/bash_completion.d/docker-compose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment