You are not logged in.

#1 2021-09-28 23:03:27

vikon
Member
Registered: 2020-11-08
Posts: 4

Docker compose is gone after update

At the morning I was working with Docker. Some hours ago I updated using pacman -Syu, docker-compose 2.0.0.1 was available, and it installed. After some time, I noticed the binary was gone.

Did this happened to anyone here today?

Offline

#2 2021-09-29 00:42:58

vikon
Member
Registered: 2020-11-08
Posts: 4

Re: Docker compose is gone after update

Oh wow, it is now docker compose, without the hyphen.
Never imagined they would just dump the docker-compose binary like that

Offline

#3 2021-09-29 00:49:28

tuxayo
Member
Registered: 2013-02-26
Posts: 27

Re: Docker compose is gone after update

https://docs.docker.com/compose/cli-command/

It's a subcommand of docker now.

I haven't had the time to dig how to cleanly preserve backward compat for scripts. But this is worth investigating:

> Starting with Docker Desktop 3.4.0, you can run Compose V2 commands without modifying your invocations, by enabling the drop-in replacement of the previous docker-compose with the new command. See the section Installing Compose v2 for detailed instructions how to enable the drop-in replacement.

Something worth exploring is that maybe docker supports running `docker compose` since a long time so it's not an issue converting scripts even on distro with older docker version.

Offline

#4 2021-09-29 01:46:55

tuxayo
Member
Registered: 2013-02-26
Posts: 27

Re: Docker compose is gone after update

> Something worth exploring is that maybe docker supports running `docker compose` since a long time so it's not an issue converting scripts even on distro with older docker version.

Nope. It seem docker compose provides a plugin for docker to add the compose subcommand. Which is why when I tried on a Debian testing install, "docker compose" wasn't available because docker-compose package isn't yet v2. Even though docker itself was up to date.

Offline

#5 2021-09-29 07:18:38

Xebat
Member
From: Kurdistan
Registered: 2021-02-22
Posts: 10

Re: Docker compose is gone after update

I came across this issue today too.

Is there an easy way I can go back to the previous version of docker-compose that I had installed? I'm not even sure what the previous version number was sad

Is there a way to undo a package update?


“We can disagree and still love each other unless your disagreement is rooted in my oppression and denial of my humanity and right to exist.” James Baldwin

Offline

#6 2021-09-29 07:28:08

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Docker compose is gone after update

Xebat wrote:

Is there a way to undo a package update?

If only Arch had a community supported website that included editable information about every aspect of the distro, including the package manager.

Why would you downgrade anyway: have you bothered to read this thread?

tuxayo wrote:

It's a subcommand of docker now.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2021-09-29 07:35:20

Xebat
Member
From: Kurdistan
Registered: 2021-02-22
Posts: 10

Re: Docker compose is gone after update

At work, we have "Make" commands (e.g. Make run) that sets everything up (including the required docker containers) and runs the solution.

At the moment, not all members of the team have the latest version of docker, so if I update the Make file, it will break things for them.

I'm still new to Arch, I'll have a read on how I can go back a version smile

Thanks Jason


“We can disagree and still love each other unless your disagreement is rooted in my oppression and denial of my humanity and right to exist.” James Baldwin

Offline

#8 2021-09-30 08:50:43

deterok
Member
Registered: 2017-08-31
Posts: 4

Re: Docker compose is gone after update

Ok, now vscode devcontainer doesn't work. I'll try to make a temporary fix by creating an alias for the subcommand.

Offline

#9 2021-09-30 09:43:28

deterok
Member
Registered: 2017-08-31
Posts: 4

Re: Docker compose is gone after update

Xebat wrote:

At work, we have "Make" commands (e.g. Make run) that sets everything up (including the required docker containers) and runs the solution.

At the moment, not all members of the team have the latest version of docker, so if I update the Make file, it will break things for them.

I'm still new to Arch, I'll have a read on how I can go back a version smile

Thanks Jason

So you can use next command to downgrade docker-compose

pacman -U  /var/cache/pacman/pkg/docker-compose-1.*-any.pkg.tar.zst

Or make something like this

cat <<'EOF' | sudo tee /usr/local/bin/docker-compose
#!/bin/sh

exec docker compose --compatibility "$@"
EOF
sudo chmod +x /usr/local/bin/docker-compose

Offline

#10 2021-09-30 10:25:58

andrej
Member
Registered: 2012-03-31
Posts: 21

Re: Docker compose is gone after update

To fix run as root

curl -fL https://github.com/docker/compose-switch/releases/download/v1.0.2/docker-compose-linux-amd64 -o /usr/local/bin/compose-switch
chmod +x /usr/local/bin/compose-switch
ln -s /usr/local/bin/compose-switch /usr/local/bin/docker-compose

Official docs have version 1.0.1 which doesn't work, 1.0.2 does.
This should hopefully work for the transition period.

Offline

Board footer

Powered by FluxBB