Files
code-snippets/Dockerfile
Liam Pietralla 80031f13b4
All checks were successful
Build, Test & Publish / Build (pull_request) Successful in 1m0s
Build, Test & Publish / Build and Publish Container Image (pull_request) Has been skipped
Build, Test & Publish / Deploy to Infrastructure (pull_request) Has been skipped
node docs and switch to pnpm
2026-03-04 07:34:58 +11:00

24 lines
400 B
Docker

FROM nginx:alpine AS base
EXPOSE 80
WORKDIR /app
FROM node:24 AS build
WORKDIR /src
# Copy package.json and package-lock.json
COPY package.json .
COPY pnpm-lock.yaml .
# Install dependencies
RUN corepack enable
RUN pnpm install --frozen-lockfile
# Copy the app
COPY . .
# Build the app
RUN pnpm run build
FROM base AS final
WORKDIR /usr/share/nginx/html
COPY --from=build /src/.vitepress/dist .