docker-compose icon indicating copy to clipboard operation
docker-compose copied to clipboard

Issues with Compose V2

Open colececil opened this issue 3 years ago • 3 comments

Docker Desktop opted me in to the Compose V2 beta without me realizing it, and I ran into some issues with it using this library in an Electron app my team built. Here are the issues I saw (I also mentioned them in a comment in Docker's GitHub issue):

  • The Docker Compose logs being output in our Electron app no longer had color.
  • When using the buildMany function, Docker Compose not only built the services I passed in, but also the services they depend on (with Compose V1, only the services I pass in are built).
  • I was getting some really long Go error message sometimes when running containers. I couldn't figure out what the message meant (and I don't remember exactly what it said), but things seemed to still be working even after getting the error message.

I'm not sure if these issues are under your control or not, but thought I'd at least let you know about them.

colececil avatar Aug 05 '21 23:08 colececil

@colececil Thanks for reporting! We’re currently testing against v2 but we’re not there yet.

AlexZeitler avatar Aug 07 '21 19:08 AlexZeitler

We have forked this to add Compose v2 support, what do you think of this implementation @AlexZeitler? Interested in a PR or what are your plans going forward to add support?

strophy avatar Sep 16 '22 06:09 strophy

@strophy If you would send a PR I'll be more than happy to merge it.

For v1 compatibility, I would suggest not changing the default implementation but maybe export a composev2 which runs your implementation. As v2 has diverged from v1 already I guess this should be the easiest way to maintain both side by side.

AlexZeitler avatar Sep 16 '22 16:09 AlexZeitler

@strophy, thanks for working on this! Has there been any progress in merging the changes back here? Or do I need to use @dashevo/docker-compose instead from here out?

colececil avatar Nov 03 '22 23:11 colececil

Hi @colececil the work to prepare @dashevo/docker-compose was done by a contractor, I've asked him to look at how much work a PR would be

strophy avatar Nov 07 '22 01:11 strophy

Docker compose v2 support is quite important. What would be the next steps to get this pull request going?

wasserholz avatar Feb 01 '23 07:02 wasserholz

@strophy I just noticed I can create a pull request from your repo to this repo.

This would allow us to move on without work required from your side.

Are you ok with this?

AlexZeitler avatar Feb 01 '23 08:02 AlexZeitler

@AlexZeitler by all means please go ahead, we kept your MIT License on the fork! We've just been overloaded and didn't get around to doing a PR :sweat_smile:

It has been working well for a long time in production now so should be an easy merge. Thanks for continuing to maintain the project!

strophy avatar Feb 01 '23 12:02 strophy

@strophy Thanks!

Progress can be tracked here: https://github.com/PDMLab/docker-compose/pull/224

AlexZeitler avatar Feb 01 '23 12:02 AlexZeitler

docker-compose (v1) and docker compose (v2) have diverged already causing about 10 failing tests now.

For example docker compose config doesn't return the version info from the docker-compose.yml file in recent versions.

Hence, I've decided to create to separate implementations of docker-compose for v2 (but it'll be part of this library).

This resulted in a new PR #228.

#224 will be closed.

AlexZeitler avatar Feb 05 '23 20:02 AlexZeitler