Files
Business-Management/changelog/2026-04-12_docker-fixes.md
curo1305 2351b489fe Fix Docker build: lockfile, BuildKit DNS, and setuptools build backend
- Generate frontend/package-lock.json (required by npm ci)
- Add network: host to BuildKit build stages to fix DNS in pip installs
- Switch pyproject.toml build backend to setuptools.build_meta (stable)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 15:40:18 +02:00

24 lines
1.3 KiB
Markdown

# 2026-04-12 — Fix Docker build issues
**Timestamp:** 2026-04-12T13:40:00
## Summary
Resolved three Docker build failures preventing the dev stack from starting. All three containers (db, backend, frontend) now build and run successfully.
## Issues Fixed
1. **No `package-lock.json`**`npm ci` requires a lockfile. Generated `frontend/package-lock.json` inside a throwaway `node:20-alpine` container (no host installation).
2. **BuildKit DNS failure** — Docker BuildKit build steps had no DNS resolution, causing pip to fail on PyPI connections. Fixed by adding `network: host` to both `backend` and `frontend` build configs in `docker-compose.yml`.
3. **`setuptools.backends.legacy` unavailable** — The `pyproject.toml` referenced a setuptools 68+ only backend path. Changed to the stable `setuptools.build_meta` backend (available since setuptools 40).
## Files Modified
- `docker-compose.yml` — added `network: host` to `backend` and `frontend` build sections
- `backend/pyproject.toml` — changed build backend from `setuptools.backends.legacy:build` to `setuptools.build_meta`; bumped setuptools requirement to `>=45`
- `backend/Dockerfile` — reverted intermediate `--no-build-isolation` workaround (no longer needed)
## Files Added
- `frontend/package-lock.json` — npm lockfile required by `npm ci` in the frontend Dockerfile