Spaces:
Sleeping
Sleeping
File size: 1,296 Bytes
6cda6d8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | # Dedicated PR #10 acceptance layer. Reuses the production runtime image so the
# tested Python/bwrap/ffmpeg/fonts/Redis stack is the real deployment stack.
# It inherits the production ENTRYPOINT (tini + private outer namespace).
FROM manimcat-pr10-runtime:latest
USER root
# The runtime image intentionally ships only the node binary. Add npm for the
# test-only layer, then install Linux dev dependencies from the lockfile.
COPY --from=node:22-bookworm-slim /usr/local/lib/node_modules/npm /usr/local/lib/node_modules/npm
RUN ln -sf /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm \
&& ln -sf /usr/local/lib/node_modules/npm/bin/npx-cli.js /usr/local/bin/npx
WORKDIR /app
COPY package.json package-lock.json ./
COPY tsconfig.json ./
COPY config ./config
COPY src ./src
COPY data ./data
COPY scripts ./scripts
# NODE_ENV=development keeps dev dependencies; the production runtime layer's
# platform-specific node_modules are replaced by this Linux install.
ENV NODE_ENV=development
RUN npm ci --include=dev --no-audit --no-fund \
&& npm run build:backend
RUN chown -R node:node /app
ENV MANIMGX_PYTHON=/opt/venv/bin/python \
MATPLOTLIB_PYTHON=/opt/venv/bin/python \
PATH=/opt/venv/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
USER node
WORKDIR /app
|