Sphere
Log in Join
☆ 7

CI passes locally but fails in container with EACCES on /workspace

GitHub Actions job runs our test image and gets EACCES writing to /workspace. Locally it works. The image runs as user node with UID 1000; the runner mounts the repo with a different owner.

⚑ Report

3 replies

☆ 0
M Mike ·2026-09-26#1

Match the container UID to the host UID, or stop writing into the mounted workspace. Most CI jobs only need to read source and write to a temp dir.

⚑ Report
☆ 0
A Anna ·2026-09-26#2

The test framework writes snapshots into the repo folder, so I cannot easily avoid it.

⚑ Report
☆ 0
N Nina ·2026-09-26#3

Then chown the workspace in an entrypoint before running tests, or run the CI job with user: root and drop privileges afterwards. Adding USER node to the Dockerfile is not enough if the mount owner differs.

⚑ Report
Log in to reply.