fix: client dockerfile is missing hook package.json - #2352
Conversation
ef70ce9 to
6cb3e02
Compare
|
🤖 Hey ! The security scan report for the current pull request is available here. |
|
🤖 Hey ! The security scan report for the current pull request is available here. |
| RUN chmod -R g=u /etc/nginx/html | ||
| COPY --from=build /app/apps/client/dist /etc/nginx/html/ | ||
| COPY --chmod=660 ./apps/client/nginx/default.conf /etc/nginx/conf.d/default.conf | ||
| COPY --chmod=750 ./apps/client/nginx/entrypoint.sh /docker-entrypoint.d/99-envsubst-js-assets.sh |
There was a problem hiding this comment.
question: T'as testé avec pnpm run docker:ci ? Ou alors avec la Merge Queue ?
Je voudrais vraiment m'assurer qu'on n'aura aucun problème avec la target prod 😅
6cb3e02 to
7960cc8
Compare
|
🤖 Hey ! The security scan report for the current pull request is available here. |
shikanime
left a comment
There was a problem hiding this comment.
Review: #2352 — fix: client dockerfile is missing hook package.json
Verdict: REQUEST CHANGES (build-breaking permission regression)
Findings
[blocker] apps/client/Dockerfile prod stage dropped ownership/permission setup. The base prod stage had:
COPY --chown=nginx:root --from=build /app/apps/client/dist /etc/nginx/html/
COPY --chown=nginx:root --chmod=660 ./apps/client/nginx/default.conf /etc/nginx/conf.d/default.conf
COPY --chown=nginx:root --chmod=750 ./apps/client/nginx/entrypoint.sh /docker-entrypoint.d/99-envsubst-js-assets.sh
RUN chmod -R g=u /etc/nginx/html
The PR head removes every --chown=nginx:root and the RUN chmod -R g=u /etc/nginx/html. nginxinc/nginx-unprivileged runs as USER 101 (nginx), so the now root:root 0660 default.conf and root:root html assets are not readable by nginx → nginx -t fails → container exits. Restore the --chown=nginx:root flags and the RUN chmod -R g=u /etc/nginx/html.
[warning] apps/server-nestjs/Dockerfile:93-94 — --chown=node:root dropped on the prod COPYs. App starts as USER node reading world-readable artifacts, but any runtime write under /app fails. Restore --chown=node:root.
[nit] Scope — the diff also bundles a 20-file pnpm-catalog migration unrelated to the bug. The hook fix itself (COPY packages/hooks/package.json before pnpm install) is correct and complete; consider splitting the catalog migration so the permission regression above is easier to catch.
Compliance checklist
- Stated bug fixed (hooks
package.jsoncopied before install in both Dockerfiles) - No leaked secrets / no
--network=host/--ignore-scriptsretained - Docker non-root best practice — regressed in client prod stage
- Image actually starts (nginx can't read root-owned 0660 config)
7960cc8 to
649aa2c
Compare
|
🤖 Hey ! The security scan report for the current pull request is available here. |
649aa2c to
b0e158b
Compare
|
🤖 Hey ! The security scan report for the current pull request is available here. |
b0e158b to
75e217a
Compare
|
🤖 Hey ! The security scan report for the current pull request is available here. |
Review — PR #2352 (fix: client dockerfile is missing hook package.json)Verdict: REQUEST CHANGES — one blocker (runtime regression in client prod image), the rest is solid. blocker
The PR removed every Chain that breaks:
On Fix (restore the missing permission step): (Keep the warnings (non-blocking, please confirm)
nits
Verified
Release-managed files
|
75e217a to
13c6e12
Compare
|
🤖 Hey ! The security scan report for the current pull request is available here. |
13c6e12 to
81c3038
Compare
|
🤖 Hey ! The security scan report for the current pull request is available here. |
81c3038 to
b816be1
Compare
|
🤖 Hey ! The security scan report for the current pull request is available here. |
Signed-off-by: William Phetsinorath <william.phetsinorath-open@interieur.gouv.fr> Change-Id: Id0b0a941e9effef32a9f036a406f7b286a6a6964
b816be1 to
a76d7a3
Compare
|
|
🤖 Hey ! The security scan report for the current pull request is available here. |

0 New Issues
0 Fixed Issues
0 Accepted Issues
No data about coverage (26.20% Estimated after merge)
Issues liées
Issues numéro: #2353
Quel est le comportement actuel ?
Quel est le nouveau comportement ?
Cette PR introduit-elle un breaking change ?
Autres informations