Created
August 13, 2021 19:44
-
-
Save KRostyslav/e6993cb6ea78165d9ac05a1ab2ec7992 to your computer and use it in GitHub Desktop.
Update docker-composer (https://stackoverflow.com/a/49839172/3681550)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First, remove the old version: | |
# If installed via apt-get | |
sudo apt-get remove docker-compose | |
# If installed via curl | |
sudo rm /usr/local/bin/docker-compose | |
# If installed via pip | |
pip uninstall docker-compose | |
# curl + grep | |
VERSION=$(curl --silent https://api.github.com/repos/docker/compose/releases/latest | grep -Po '"tag_name": "\K.*\d') | |
# curl + jq | |
# VERSION=$(curl --silent https://api.github.com/repos/docker/compose/releases/latest | jq .name -r) | |
DESTINATION=/usr/local/bin/docker-compose | |
sudo curl -L https://github.com/docker/compose/releases/download/${VERSION}/docker-compose-$(uname -s)-$(uname -m) -o $DESTINATION | |
sudo chmod 755 $DESTINATION |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment