Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatible with Docker Compose v2 #46

Closed
Raniz85 opened this issue Oct 1, 2021 · 12 comments
Closed

Incompatible with Docker Compose v2 #46

Raniz85 opened this issue Oct 1, 2021 · 12 comments

Comments

@Raniz85
Copy link

Raniz85 commented Oct 1, 2021

It seems Docker Compose 2.x names containers differently and this is causing Lando to not find them.

Docker Compose now uses - as a separator (see here) while Lando seems to be expecting _ resulting in weird error messages when starting containers.

My setup continuously logs

Waiting until database service is ready...

Turning on verbose logging additionally shows

process pid37 had output stdout=, stderr=unknown shorthand flag: 'T' in -T`

Digging through the code with a debugger I discovered this error in isRunning in docker.js:

Error: (HTTP code 404) no such container - No such container: XXX_database_1

docker ps shows a running container named XXX-database-1.

@pirog
Copy link
Member

pirog commented Oct 1, 2021

@Raniz85 we dont currently support Docker Compose 2.x. Recommend you update to a recent version of Lando as that will force usage of Docker Compose V1 behind the scenes. At some point we will support Docker Compose V2

@Raniz85
Copy link
Author

Raniz85 commented Oct 4, 2021

That proves a bit difficult. Your official Arch Linux package is version 3.0.24 whereas the ones available in AUR is 3.1.4 and 3.2.3 (which is a repackaged .deb I think).

Neither of these complain about my docker-compose being 2.x.

I'll have to downgrade docker-compose and mask it and see if I can get the package maintainers to update the packages.

@arischmod
Copy link

Yiap, I confirm that on Arch (an Manjaro) lando which moved to Docker Compose V2 a long time now
the AUR package lando-bin (3.6.0-3) works again.

Only thing you may have to do is to manually install the libxcrypt-compat package from the official repos (if lando commands cry about it).

@pschoffer
Copy link

This PR applied to our fork fixed it for us - lando/cli#151

@millnut
Copy link

millnut commented Sep 12, 2023

Confirming the PR above fixed my issue with Docker 4.23.0 as that release looks like it turns Docker Compose v2 on by default with no setting to turn it off like before.

@pirog pirog transferred this issue from lando/cli Sep 12, 2023
@pirog
Copy link
Member

pirog commented Sep 12, 2023

@millnut FWIW i am running on 4.23.0 without issue.

It might be worth noting that if you are on the most recent version of Lando it should download and use Docker Compose 1 if it cannot find it in Docker Desktop and use that. It should not use Docker Compose 2 unless you've explicitly configured it to do that.

@millnut
Copy link

millnut commented Sep 12, 2023

Hi @pirog I'm using Lando v3.18.0. Docker Desktop had Docker Compose v2 set to disabled however the new version which I've just upgraded to has overridden that and seems to have forced Docker Compose v2 but they no longer have the ability to turn it off.

I wonder if upgrading to the next stable release of Lando will detect Docker Compose v1 is not there and download it.

@pirog
Copy link
Member

pirog commented Sep 12, 2023

@millnut this functionality was added in https://github.com/lando/core/releases/tag/v3.17.0 so youd need to have running that version of Lando core or higher

@millnut
Copy link

millnut commented Sep 12, 2023

Thanks @pirog I forgot to mention I'm on macOS. I'm on 3.18 which is newer however I don't have a ~/.lando/bin folder how can I force a generation of that folder to see if it resolves things

@pirog
Copy link
Member

pirog commented Sep 12, 2023

3.18 is the CLI version you are using, i am talking about the CORE version. You would need to update your CLI to https://github.com/lando/cli/releases/tag/v3.19.5 to get that version of CORE.

I understand the versioning between various components is currently confusing but it will be unified soonish.

@millnut
Copy link

millnut commented Sep 12, 2023

Ah yes, thanks @pirog the pre-release https://github.com/lando/lando/releases/tag/v3.19.5 fixed this. Is it possible to tag a new stable release that mentions in the notes it fixes Docker Desktop 4.23.0 compatibility due to the removal of Docker Compose v1

@reynoldsalec
Copy link
Member

Note that Lando is compatible with Docker Compose v2 as of v3.20, so this should no longer be an issue. See blog post for more details: https://lando.dev/blog/2023/09/25/v320-extended.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants