Fix wp-env mu-plugins Docker mount failure#587
Fix wp-env mu-plugins Docker mount failure#587obenland wants to merge 1 commit intoWordPress:trunkfrom
Conversation
Docker failed to create mountpoints for individual files overlaid on top of a directory mount, because the target paths resolved outside the container rootfs. Switch to mapping the entire mu-plugins directory to a local mocks folder first, then overlaying pub/ and wporg-mu-plugins/ on top — matching the pattern used in wporg-two-factor. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
There was a problem hiding this comment.
Pull request overview
This PR fixes the plugin-directory wp-env Docker startup failure by restructuring MU-plugin volume mappings to avoid problematic nested individual-file mounts.
Changes:
- Switch MU-plugins mapping to mount a local directory first, then overlay
pub/andwporg-mu-plugins/. - Consolidate local mock MU-plugin files under
environments/mocks/mu-plugins/. - Simplify
.wp-env.jsonMU-plugin mappings from multiple file mounts to three directory mounts.
Reviewed changes
Copilot reviewed 1 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| environments/plugin-directory/.wp-env.json | Reworks MU-plugin mappings to a directory-first overlay approach to prevent Docker mount failures. |
| environments/mocks/mu-plugins/wporg-query-filter.php | Adds a local-only query short-circuit MU-plugin to avoid queries to production-only tables. |
| environments/mocks/mu-plugins/wporg-dev-login.php | Adds a local-only one-click login helper on the login screen. |
| environments/mocks/mu-plugins/mu-plugins-loader.php | Adds a loader MU-plugin to bootstrap MU-plugins from pub/ and wporg-mu-plugins/. |
| environments/mocks/mu-plugins/mu-plugin-local-reminders.php | Adds a local-only admin notice to guide importing approved plugins that have no content. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@dd32 I wanted to propose this update again, the way it's setup in trunk currently just doesn't work on my machine. I'm using Docker Desktop on MacOS which uses VirtioFS and when it tries to create file mountpoints inside an already-mounted directory, the paths resolve through Do you use a different setup? |
Summary
wporg-query-filter.php, etc.) overlaid on top of a directory mount resolved outside the container rootfswp-content/mu-pluginsto./mocks/mu-plugins/, then overlaypub/andwporg-mu-plugins/on top — matching the pattern used in wporg-two-factorenvironments/mocks/mu-plugins/, reducing 6 mapping entries to 3Test plan
npm run plugins:env start— should start without Docker mount errorsnpx wp-env run cli -- wp plugin list --status=must-usenpx wp-env run cli -- wp eval-file wp-content/env-bin/import-plugins.php🤖 Generated with Claude Code