Docker-compose 2.0

Currently reading
Docker-compose 2.0

DS918+, DS414j
Operating system
  1. Linux
  2. Windows
  3. other
Mobile operating system
  1. Android
Well, I know it's a little early to jump onto the 2.0 bandwagon, however I attempted to run my normal update for docker-compose:
version=$(curl -s | jq -r .tag_name) && sudo curl -L "${version}/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
If I try to run docker-compose after that I get:
/usr/local/bin/docker-compose: line 1: Not: command not found
When roll back to 1.29.2 it all works perfectly again.

Any ideas as to what I'm doing wrong? (Other than trying to keep software completely up to date ofc).
Last edited:
The problem is a different one than you think:
cat /usr/local/bin/docker-compose

$(uname -m) will render x86_64, which was correct up to 1.x releases.
In 2.0 they switched the last part of the filename to amd64.
Last edited:
@one-eyed-king so if I'm understanding things correctly it now becomes:
version=$(curl -s | jq -r .tag_name) && sudo curl -L "${version}/docker-compose-$(uname -s)-amd64" -o /usr/local/bin/docker-compose

Which works, :)
However now I get:
/volume2/docker/compose$ docker-compose up -d
unknown shorthand flag: 'd' in -d
See 'docker --help'.
docker-compose up
also fails as does
docker compose up
There is obviously information following about various commands which I've cut to save space.
Looks like I need to do further digging. :(

OK looks like I may have found it... It's now a CLI plugin:
 mkdir -p ~/.docker/cli-plugins/
$ curl -SL -o ~/.docker/cli-plugins/docker-compose
$ chmod +x ~/.docker/cli-plugins/docker-compose
docker compose up -d now works!!! :D
Although first run recreated ALL of my containers.

So, my new bash aliases are:
alias doccomup='version=$(curl -s | jq -r .tag_name) && sudo curl -L "${version}/docker-compose-$(uname -s)-amd64" -o ~/.docker/cli-plugins/docker-compose'
to update docker-compose and:
alias dcpup='docker compose pull && docker compose up -d && docker system prune'
To update all my default containers and cleanup after. :)
You are almost there ^^

Now you replaced $(uname -s)-$(uname -m) with amd64, whereas you only need to replace $(uname -m) with amd64 (like mentioned in my previous post) :)

I hope you are not just doing guesswork, and instead checked the github release page to actualy see what filenames are used.
@one-eyed-king it was simply me removing too much information, not had enough coffee yet.
I believe I now have it all working, it would be helpful if what I've done could be double checked by someone with better knowledge so it may help others. :)
I have to say I do like the changes in v2 (at least thus far) the process has far more information attached, e.g. time taken and what each container is doing at any given stage.
Last edited:
Docker compose is a cli plugin now? From the inplace update of your previous post, it seems it is now.

Docker recently introduced docker compose (as in subcommand of the docker cli), which aims for cloud provider deployments, whereas docker-compose is the the single node orchestrator most people require and use.

I will validate and verify your approach later. One thing to note is that the output filename requires the folder to be pre-created for a successful download.

Since you managed to deploy your compose files with it, it seems the limitation of cloud provider deployments is not true anymore. Exciting change, finaly docker compose and docker stack deployments are handeld the same way. To be honest, docker-compose was adopted by docker and does not allign with the rest of their tooling... everything else has been written in go, while docker-compose based on python.
lgtm if you add the mkdir in the beginning and chmod part at the end:

Run as root or user (if your user is allowed to access the docker.sock)
alias doccomup='mkdir -p ~/.docker/cli-plugins/ && version=$(curl -s | jq -r .tag_name) && curl -L "${version}/docker-compose-$(uname -s)-amd64" -o ~/.docker/cli-plugins/docker-compose && chmod +x ~/.docker/cli-plugins/docker-compose'
FYI they've now changed it back.. So
the amd64 goes back to $(uname -m)

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

I have no idea what you are doing, but I just tested it based on the instructions of the guide you linked...
I am actually not sure, if depends_on ever played any role after the first deployment at all. Usually...
ZERO errors. The urls for sonarr gives unexpectedly dropped connection. Transmission has returned...
I'm a fan of Duplicacy for backups, as it is robust and well-supported and has an active forum. While it...
A while ago I was tinkering around and created a simple templating for NextCloud. If you are not alergic...
Creating a Docker-Compose for al your running containers? Maybe you will also find this post useful . I...

Welcome to! is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!