18 lines
547 B
Docker
18 lines
547 B
Docker
# This Source Code Form is subject to the terms of the Mozilla Public License,
|
|
# v. 2.0. If a copy of the MPL was not distributed with this file, You can
|
|
# obtain one at https://mozilla.org/MPL/2.0/.
|
|
|
|
FROM node:22.11.0-bookworm-slim AS builder
|
|
WORKDIR /app
|
|
COPY . .
|
|
RUN npm install && npm run build
|
|
|
|
FROM node:22.11.0-bookworm-slim AS runner
|
|
LABEL maintainer="Nicola Clark <nicola@slottedspoon.dev>"
|
|
EXPOSE 3000
|
|
WORKDIR /app
|
|
COPY package.json package-lock.json ./
|
|
COPY --from=builder /app/build ./build
|
|
RUN npm ci --omit dev
|
|
CMD ["node", "build"]
|