Last active
December 10, 2024 19:04
-
-
Save deviantony/2b5078fe1675a5fedabf1de3d1f2652a to your computer and use it in GitHub Desktop.
Install latest version of Docker Compose
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
#!/bin/bash | |
## THIS IS THE OLD WAY | |
## Nowadays, simply follow the Compose installation instructions in the official documentation: | |
## https://docs.docker.com/compose/install/ | |
# 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 |
Thanks a lot, still working in 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
👍