code-snippets/Dockerfile
Liam Pietralla 8ad5845efc
Some checks failed
Build, Test & Publish / Build and Publish Container Image (push) Has been cancelled
Build, Test & Publish / Deploy to Infrastructure (push) Has been cancelled
Build, Test & Publish / Build (push) Has been cancelled
initial commit
2024-09-05 13:54:08 +10:00

23 lines
358 B
Docker

FROM nginx:alpine AS base
EXPOSE 80
WORKDIR /app
FROM node:20 as build
WORKDIR /src
# Copy package.json and package-lock.json
COPY package.json .
COPY package-lock.json .
# Install dependencies
RUN npm ci
# Copy the app
COPY . .
# Build the app
RUN npm run build
FROM base AS final
WORKDIR /usr/share/nginx/html
COPY --from=build /src/.vitepress/dist .