Skip to content

Instantly share code, notes, and snippets.

@cesarila
Last active November 7, 2021 04:44
Show Gist options
  • Save cesarila/a58504fbc3924bcef6ae8ce83a652071 to your computer and use it in GitHub Desktop.
Save cesarila/a58504fbc3924bcef6ae8ce83a652071 to your computer and use it in GitHub Desktop.
Download and install the latest version of docker-compose for linux
#!/bin/bash
mkdir ~/.docker/cli-plugins
latest_url=$(\
curl -s https://api.github.com/repos/docker/compose/releases/latest \
| grep "browser_download_url" \
| grep -i "$(uname -s)-$(uname -m)\"" \
| cut -d : -f 2,3 \
| tr -d \")
sudo curl -L $latest_url -o ~/.docker/cli-plugins/docker-compose
sudo chmod +x ~/.docker/cli-plugins/docker-compose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment