Skip to content

Instantly share code, notes, and snippets.

@deviantony
Last active October 25, 2023 15:08
  • Star 69 You must be signed in to star a gist
  • Fork 25 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Install latest version of Docker Compose
#!/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
@withakay
Copy link

Docker Desktop includes docker-compose these days, https://docs.docker.com/compose/install/compose-desktop/

@bumbummen99
Copy link

bumbummen99 commented Jul 16, 2022

Docker Desktop includes docker-compose these days, https://docs.docker.com/compose/install/compose-desktop/

You can even link docker-compose to the compose plugin in the docker folder for compatibility.

ln -s /usr/local/bin/docker-compose /usr/libexec/docker/cli-plugin/docker-compose

@hishayu
Copy link

hishayu commented Aug 22, 2022

Thanks so much!

@iThunderApp
Copy link

Great!! Thanks a lot!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment