Skip to content

Fix PHP-WASM node rebuild Docker context - #3608

Merged
mho22 merged 2 commits into
WordPress:trunkfrom
chubes4:fix/php-wasm-node-builds-dockerignore
May 9, 2026
Merged

Fix PHP-WASM node rebuild Docker context#3608
mho22 merged 2 commits into
WordPress:trunkfrom
chubes4:fix/php-wasm-node-builds-dockerignore

Conversation

@chubes4

@chubes4 chubes4 commented May 7, 2026

Copy link
Copy Markdown
Contributor

What?

Re-include node-builds/ in packages/php-wasm/.dockerignore so the existing PHP-WASM node rebuild path can copy extension side modules into the Docker image.

Fixes #3607.

Why?

packages/php-wasm/compile/php/Dockerfile does:

COPY ./${EMSCRIPTEN_ENVIRONMENT}-builds/ /root/${EMSCRIPTEN_ENVIRONMENT}-builds

For node builds, that requires node-builds/ to be present in the Docker build context. The current .dockerignore excludes it, causing the existing node rebuild command to fail at COPY ./node-builds/ /root/node-builds.

Testing Instructions

Run:

node packages/php-wasm/compile/build.js --PLATFORM=node --PHP_VERSION=8.3 --WITH_JSPI=yes

Expected: the Docker build should pass the COPY ./node-builds/ /root/node-builds step and complete the PHP-WASM image/output extraction.

Testing performed

  • Confirmed the failure mode before the fix in the Studio/Playground Homeboy rig.
  • Applied this two-line .dockerignore fix locally.
  • Re-ran node packages/php-wasm/compile/build.js --PLATFORM=node --PHP_VERSION=8.3 --WITH_JSPI=yes from a clean PR worktree using existing installed dependencies.
  • Verified Docker successfully copied ./node-builds/, processed the extension side modules, built the image, and extracted the JSPI output.

AI assistance

  • AI assistance: Yes
  • Tool(s): OpenCode (GPT-5.5)
  • Used for: Debugging the Homeboy rig failure, identifying the Docker context regression, drafting this small fix and PR description. Chris reviewed and directed the upstream fix path.
@chubes4
chubes4 requested review from a team, Copilot and mho22 May 7, 2026 00:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Re-includes node-builds/ in the packages/php-wasm Docker build context so the existing node rebuild path can successfully COPY build artifacts into the image (fixing #3607).

Changes:

  • Un-ignore node-builds/ and its contents in packages/php-wasm/.dockerignore so Docker can include them in the build context.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -7,3 +7,5 @@
!compile-extension/docker/Dockerfile.ext
!compile-extension/scripts/
!compile-extension/scripts/build-in-docker.sh

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about this, and it does make sense. But I'm leaving it open until someone else sees this.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the comment is needed.

@mho22 mho22 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should also add web-builds. Ready to merge after that addition.

@@ -7,3 +7,5 @@
!compile-extension/docker/Dockerfile.ext
!compile-extension/scripts/
!compile-extension/scripts/build-in-docker.sh

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the comment is needed.

@mho22 mho22 self-assigned this May 7, 2026
@chubes4

chubes4 commented May 7, 2026

Copy link
Copy Markdown
Contributor Author

@mho22 web-builds added. Thanks!

@mho22 mho22 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chubes4 Thank you!

@chubes4
chubes4 force-pushed the fix/php-wasm-node-builds-dockerignore branch from a0b1747 to 394b8b8 Compare May 7, 2026 23:15
@mho22
mho22 merged commit 86bf809 into WordPress:trunk May 9, 2026
53 checks passed
@chubes4
chubes4 deleted the fix/php-wasm-node-builds-dockerignore branch May 9, 2026 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants