Skip to content

Dockerfile: use corepack + skip Cypress binary to stabilise Smoke Test build#737

Merged
EdwardMoyse merged 2 commits into
HSF:mainfrom
XPE-7:fix/docker-skip-cypress
Nov 20, 2025
Merged

Dockerfile: use corepack + skip Cypress binary to stabilise Smoke Test build#737
EdwardMoyse merged 2 commits into
HSF:mainfrom
XPE-7:fix/docker-skip-cypress

Conversation

@XPE-7
Copy link
Copy Markdown
Contributor

@XPE-7 XPE-7 commented Nov 19, 2025

Screenshot 2025-11-20 045555

The Docker image used by the Smoke Test workflow was failing during yarn install because Cypress attempted to fetch and set up its native binary in an environment where we don’t actually run e2e tests. This PR adjusts the Dockerfile to make that build deterministic and lean.

Background
After PR #736 (scoping Jest/Cypress TS types) was merged, the fresh build on main re-ran the Smoke Test and exposed this long‑standing issue: Cypress’ install step isn’t needed for the static docs build and sometimes breaks on missing native libraries. The workflow itself (ref 16bd6fa) only builds and curls the served site—no Cypress commands are executed.

Changes

  • Added ENV CI=1 and ENV CYPRESS_INSTALL_BINARY=0 before dependency installation to skip downloading the Cypress binary.
  • Replaced the global npm install yarn with corepack enable so the repo’s committed Yarn 3 (yarnPath) is used consistently.
  • Left yarn deploy:web and the multi‑stage pattern intact.
  • No application code or build output logic changed beyond that.
  • Also updates smoke_test.yml to use actions/checkout@v4 and docker/setup-buildx-action@v3 to remove deprecation warnings.

Rationale
We only need the compiled static site for the Smoke Test; pulling in the Cypress binary adds no value and introduces avoidable fragility. Using Corepack avoids accidentally invoking a legacy global Yarn version.

Testing
Locally built the image:

docker build -t phoenix-app .
docker run -d --name phoenix-container -p 3000:80 phoenix-app
curl -I http://localhost:3000/

Received 200 OK and site served as expected. Container logs clean (no Cypress native build attempts).

@EdwardMoyse pleas verify and merge this and let me know any further changes in it.

@EdwardMoyse EdwardMoyse merged commit 82f659e into HSF:main Nov 20, 2025
2 checks passed
@EdwardMoyse
Copy link
Copy Markdown
Member

Thank you so much @XPE-7! This is really great.

@XPE-7
Copy link
Copy Markdown
Contributor Author

XPE-7 commented Nov 20, 2025

Thank you, @EdwardMoyse glad I could help!
I’ll keep an eye out for more areas where I can contribute, and feel free to tag me anytime if something comes up.

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

Successfully merging this pull request may close these issues.

2 participants