Problem
There are two Dockerfiles in the repo:
Dockerfile (root) — used by docker-compose.yml (context: ., dockerfile: Dockerfile)
backend/Dockerfile — appears to be a leftover from an earlier layout
A developer editing backend/Dockerfile thinking they are updating the production image will silently change nothing.
How we found it
During a production readiness checklist run we fixed the root Dockerfile's HEALTHCHECK but accidentally edited backend/Dockerfile first. The build silently used the old HEALTHCHECK for two rebuild cycles before we noticed the wrong file was being changed.
Risk
- Silent no-ops for contributors editing the wrong file
HEALTHCHECK, EXPOSE, labels, and other metadata can drift
- CI builds the root Dockerfile; contributors may accidentally test
backend/Dockerfile
Proposed fix
Delete backend/Dockerfile — it serves no purpose now that the build context is the repo root.
Problem
There are two Dockerfiles in the repo:
Dockerfile(root) — used bydocker-compose.yml(context: .,dockerfile: Dockerfile)backend/Dockerfile— appears to be a leftover from an earlier layoutA developer editing
backend/Dockerfilethinking they are updating the production image will silently change nothing.How we found it
During a production readiness checklist run we fixed the root
Dockerfile'sHEALTHCHECKbut accidentally editedbackend/Dockerfilefirst. The build silently used the oldHEALTHCHECKfor two rebuild cycles before we noticed the wrong file was being changed.Risk
HEALTHCHECK,EXPOSE, labels, and other metadata can driftbackend/DockerfileProposed fix
Delete
backend/Dockerfile— it serves no purpose now that the build context is the repo root.