Files
code-snippets/Dockerfile
T
LiamPietralla b148b03b2e
Build, Test & Publish / Deploy to Infrastructure (push) Successful in 37s
Build, Test & Publish / Build (push) Successful in 42s
Build, Test & Publish / Build and Publish Container Image (push) Successful in 42s
fix build
2026-05-08 13:07:21 +10:00

25 lines
420 B
Docker

FROM nginx:alpine AS base
EXPOSE 80
WORKDIR /app
FROM node:24 AS build
WORKDIR /src
# Copy package.json and pnpm files
COPY package.json .
COPY pnpm-lock.yaml .
COPY pnpm-workspace.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 .