Build and Push Docker Image / build (push) Successful in 3m53s
An unpinned 'npm i -g pnpm' drifted to pnpm 12, which hard-errors on unapproved build scripts (ERR_PNPM_IGNORED_BUILDS) for esbuild/sharp/ unrs-resolver. Pin 10.33.0 (matching the packageManager field), approve those three via pnpm.onlyBuiltDependencies, install with --frozen-lockfile, and add a .dockerignore so local node_modules can never ride into the build. Also refresh uv.lock to latest.
37 lines
901 B
Docker
37 lines
901 B
Docker
FROM docker.io/library/node:25 AS frontend-builder
|
|
LABEL authors="lucasoskorep"
|
|
|
|
WORKDIR /build/mta-sign-ui
|
|
|
|
COPY mta-sign-ui/package.json mta-sign-ui/pnpm-lock.yaml* ./
|
|
|
|
# Pin pnpm to the version declared in mta-sign-ui/package.json ("packageManager");
|
|
# an unpinned global install drifts to new majors (pnpm 12 hard-errors on
|
|
# unapproved build scripts).
|
|
RUN npm install -g pnpm@10.33.0
|
|
|
|
COPY mta-sign-ui/ ./
|
|
|
|
RUN pnpm install --frozen-lockfile
|
|
RUN pnpm build
|
|
|
|
FROM ghcr.io/astral-sh/uv:python3.13-bookworm
|
|
LABEL authors="lucasoskorep"
|
|
|
|
WORKDIR /app
|
|
|
|
COPY pyproject.toml uv.lock README.md ./
|
|
RUN uv sync --frozen --no-dev --no-install-project
|
|
|
|
COPY mta_api_client ./mta_api_client
|
|
COPY mta_sign_server ./mta_sign_server
|
|
COPY main.py stops.txt ./
|
|
|
|
COPY --from=frontend-builder /build/mta-sign-ui/out ./static
|
|
|
|
RUN uv sync --frozen --no-dev
|
|
|
|
EXPOSE 8000
|
|
|
|
ENTRYPOINT ["uv", "run", "python", "main.py"]
|