You've already forked byos_node_lite
mirror of
https://github.com/usetrmnl/byos_node_lite.git
synced 2026-04-29 13:42:38 -07:00
26dff61c53
- Use multi-stage Docker build for smaller image size - Pin Alpine to node:22-alpine3.21 for reproducible builds - Use npm ci with package-lock.json for deterministic installs - Add engines field requiring Node.js >=20
16 lines
384 B
Docker
16 lines
384 B
Docker
# Build stage
|
|
FROM node:22-alpine3.21 AS builder
|
|
WORKDIR /app
|
|
COPY package.json package-lock.json ./
|
|
RUN npm ci
|
|
COPY . ./
|
|
|
|
# Production stage
|
|
FROM node:22-alpine3.21
|
|
WORKDIR /app
|
|
RUN apk add --no-cache chromium
|
|
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
|
|
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
|
|
COPY --from=builder /app ./
|
|
CMD ["node", "--import", "tsx", "src/Main.ts"]
|