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

wp-env - Migrate to Compose V2 #51249

Closed
igorradovanov opened this issue Jun 5, 2023 · 2 comments · Fixed by #51339
Closed

wp-env - Migrate to Compose V2 #51249

igorradovanov opened this issue Jun 5, 2023 · 2 comments · Fixed by #51339
Labels
[Package] Env /packages/env [Status] In Progress Tracking issues with work in progress [Type] Task Issues or PRs that have been broken down into an individual action to take

Comments

@igorradovanov
Copy link
Contributor

What problem does this address?

Compose V1 no longer receives updates and will not be available in new releases of Docker Desktop after June 2023.

Docker Desktop will continue to provide the 'alias' command; however, outside of that, it's not possible to run 'wp-env,' for example, on Fedora, as the new command is 'docker compose' (without a hyphen) - screenshot attached for more context.

Screenshot from 2023-06-05 22-41-14

What is your proposed solution?

wp-env should migrate from docker-compose to docker compose V2 plugin according to the next guide in the near future

@igorradovanov
Copy link
Contributor Author

For anyone stumbling upon this issue while running wp-env on POSIX/Linux, a temporary solution is to install the standalone version that uses the docker-compose syntax currently utilized by the wp-env project. You can find the version 1 documentation and installation instructions here: https://docs.docker.com/compose/install/standalone/

@skorasaurus skorasaurus added the [Package] Env /packages/env label Jun 6, 2023
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Jun 8, 2023
@jordesign jordesign added the [Type] Task Issues or PRs that have been broken down into an individual action to take label Jul 18, 2023
@firxworx
Copy link

firxworx commented Oct 3, 2023

For better developer experience across platforms this could always check for docker-compose and docker compose.

A current-version Docker Desktop install or docker open-source install (e.g. via brew) on MacOS will not have a docker-compose binary in the path. "Quick fix" solutions such as creating an alias will not work with wp-env. On MacOS wp-env should be shooting for docker compose syntax (reference the guide linked to in the OP issue).

In contrast with MacOS, a user running Windows with Docker Desktop installed on Windows and running linux via WSL2 is likely to have more flexibility with a typical setup.

It is likely both docker compose and docker-compose are supported and both will use V2.

A highly likely and generally recommended setup for current Windows + WSL users is Docker Desktop installed on the Windows side with the following settings enabled: "Use WSL 2 Based Engine" and "Use Docker Compose V2" (the latter enables V2 on docker-compose).

I would add to the docs to suggest trying the --debug flag if there is an issue to help diagnose. The wp-env output can seem to hang at "Starting WordPress" without any other error feedback unless this flag is added.

A common problem that comes up with Docker on WSL2 these days is related to ~/.docker/config.json getting "credsStore": "docker.exe" added to it. It happened in my case just now digging into an older WordPress project to add an update. Deleting that line kicks it in the pants to start clean. Reference: microsoft/WSL#8677

lithrel added a commit to lithrel/gutenberg that referenced this issue Dec 5, 2023
Update docker-compose package to 0.24.1
Use v2 as dockerCompose command

Fixes WordPress#51249
ObliviousHarmony pushed a commit that referenced this issue Dec 5, 2023
Update docker-compose package to 0.24.1
Use v2 as dockerCompose command

Fixes #51249
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Env /packages/env [Status] In Progress Tracking issues with work in progress [Type] Task Issues or PRs that have been broken down into an individual action to take
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants