Dockerfile build fails due to missing \src/\ directory (moved to \v1/src/\)
#33
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When attempting to build the Docker image using
docker build -t ruvnet/wifi-densepose:latest ., the build fails at the production stage because it attempts to COPYsrc/which no longer exists in the root directory. It appears the source code was moved tov1/src/, but theDockerfilewas not updated to reflect this path change.Steps to Reproduce:
docker build -t ruvnet/wifi-densepose:latest .Error details:
Workaround:
Manually moving or copying
v1/src/to the root directory before running the docker build resolves the issue.Please update the
Dockerfilepaths to correctly referencev1/src, or adapt the build context as needed.Analysis & Fix
Root Cause: The Dockerfile at commit
c378b70referencedsrc/paths directly, but the source code lives underv1/src/. Six paths needed updating:src.api.main:app(dev CMD)v1.src.api.main:appCOPY src/ ./src/COPY v1/src/ ./v1/src/src.api.main:app(prod CMD)v1.src.api.main:appCOPY tests/ ./tests/COPY v1/tests/ ./v1/tests/pytest tests/pytest v1/tests/bandit -r src/bandit -r v1/src/Additional fix: Added missing
v1/__init__.py— without it, the uvicorn module pathv1.src.api.main:appwould fail withModuleNotFoundErrorat container runtime even after the COPY paths are corrected.Changes ready in working tree, pending commit (git identity config needed on this machine).