Dockerfile build fails due to missing \src/\ directory (moved to \v1/src/\) #33

Closed
opened 2026-03-01 01:23:14 +08:00 by EarthPlayer1935 · 1 comment
EarthPlayer1935 commented 2026-03-01 01:23:14 +08:00 (Migrated from github.com)

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 COPY src/ which no longer exists in the root directory. It appears the source code was moved to v1/src/, but the Dockerfile was not updated to reflect this path change.

Steps to Reproduce:

  1. Clone the repository.
  2. Run docker build -t ruvnet/wifi-densepose:latest .

Error details:

ERROR: failed to build: failed to solve: failed to compute cache key: failed to calculate checksum of ref...: "/src": not found

Workaround:
Manually moving or copying v1/src/ to the root directory before running the docker build resolves the issue.

Please update the Dockerfile paths to correctly reference v1/src, or adapt the build context as needed.

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 COPY `src/` which no longer exists in the root directory. It appears the source code was moved to `v1/src/`, but the `Dockerfile` was not updated to reflect this path change. **Steps to Reproduce:** 1. Clone the repository. 2. Run `docker build -t ruvnet/wifi-densepose:latest .` **Error details:** ``` ERROR: failed to build: failed to solve: failed to compute cache key: failed to calculate checksum of ref...: "/src": not found ``` **Workaround:** Manually moving or copying `v1/src/` to the root directory before running the docker build resolves the issue. *Please update the `Dockerfile` paths to correctly reference `v1/src`, or adapt the build context as needed.*
ruvnet commented 2026-03-01 02:37:54 +08:00 (Migrated from github.com)

Analysis & Fix

Root Cause: The Dockerfile at commit c378b70 referenced src/ paths directly, but the source code lives under v1/src/. Six paths needed updating:

Line Old Path New Path
56 src.api.main:app (dev CMD) v1.src.api.main:app
63 COPY src/ ./src/ COPY v1/src/ ./v1/src/
81 src.api.main:app (prod CMD) v1.src.api.main:app
88 COPY tests/ ./tests/ COPY v1/tests/ ./v1/tests/
91 pytest tests/ pytest v1/tests/
102 bandit -r src/ bandit -r v1/src/

Additional fix: Added missing v1/__init__.py — without it, the uvicorn module path v1.src.api.main:app would fail with ModuleNotFoundError at container runtime even after the COPY paths are corrected.

Changes ready in working tree, pending commit (git identity config needed on this machine).

## Analysis & Fix **Root Cause:** The Dockerfile at commit `c378b70` referenced `src/` paths directly, but the source code lives under `v1/src/`. Six paths needed updating: | Line | Old Path | New Path | |------|----------|----------| | 56 | `src.api.main:app` (dev CMD) | `v1.src.api.main:app` | | 63 | `COPY src/ ./src/` | `COPY v1/src/ ./v1/src/` | | 81 | `src.api.main:app` (prod CMD) | `v1.src.api.main:app` | | 88 | `COPY tests/ ./tests/` | `COPY v1/tests/ ./v1/tests/` | | 91 | `pytest tests/` | `pytest v1/tests/` | | 102 | `bandit -r src/` | `bandit -r v1/src/` | **Additional fix:** Added missing `v1/__init__.py` — without it, the uvicorn module path `v1.src.api.main:app` would fail with `ModuleNotFoundError` at container runtime even after the COPY paths are corrected. **Changes ready in working tree**, pending commit (git identity config needed on this machine).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dearsky/wifi-densepose#33