Created
December 21, 2021 06:59
-
-
Save nhthai2005/f15b8259d63c88d7333e04109387ed45 to your computer and use it in GitHub Desktop.
Update docker-compose
This file contains hidden or 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
#!/bin/bash | |
# Set location of docker-compose binary - shouldn't need to modify this | |
DESTINATION=/usr/local/bin/docker-compose | |
# Get latest docker-compose version | |
# VERSION=$(curl --silent https://api.github.com/repos/docker/compose/releases/latest | jq .name -r) | |
VERSION=$(curl -s https://api.github.com/repos/docker/compose/releases/latest | grep tag_name | cut -d '"' -f4) | |
# Output some info on what this is going to do | |
echo "Note: docker-compose version $VERSION will be downloaded from:" | |
echo "https://github.com/docker/compose/releases/download/${VERSION}/docker-compose-$(uname -s)-$(uname -m)" | |
echo "Enter sudo password to install docker-compose" | |
# Download and install latest docker compose | |
sudo curl -L https://github.com/docker/compose/releases/download/${VERSION}/docker-compose-$(uname -s)-$(uname -m) -o $DESTINATION | |
sudo chmod +x $DESTINATION | |
# Output new docker-compose version info | |
echo "" | |
docker-compose version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment