Files
nike/Dockerfile
Robert Helewka dd1b5b7318
All checks were successful
CVE Scan & Docker Build / security-scan (push) Successful in 38s
CVE Scan & Docker Build / build-and-push (push) Successful in 1m20s
build(docker): add multi-stage build for SvelteKit dashboard
2026-06-12 18:32:27 -04:00

31 lines
713 B
Docker

# ── Stage 1: build the SvelteKit dashboard ──
FROM node:24-slim AS dashboard-build
WORKDIR /dashboard
COPY dashboard/package.json dashboard/package-lock.json ./
RUN npm ci
COPY dashboard/ ./
RUN npm run build
# ── Stage 2: Python runtime ──
FROM python:3.12-slim
WORKDIR /app
RUN apt-get update \
&& apt-get install -y --no-install-recommends curl \
&& rm -rf /var/lib/apt/lists/*
COPY . .
RUN pip install --no-cache-dir .
# dashboard/build is .dockerignored from the host context; copy the freshly
# built dashboard from stage 1 so FastAPI can serve it at /app/dashboard/build
COPY --from=dashboard-build /dashboard/build ./dashboard/build
EXPOSE 8000
CMD ["python", "run.py"]