mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-22 17:31:03 +01:00
27 lines
522 B
Docker
27 lines
522 B
Docker
# Build stage
|
|
FROM node:20-alpine AS build
|
|
|
|
# Set the working directory in the container
|
|
WORKDIR /app
|
|
|
|
# Install pnpm
|
|
RUN npm install -g pnpm
|
|
|
|
# Copy package.json and pnpm-lock.yaml
|
|
COPY package.json pnpm-lock.yaml ./
|
|
|
|
# Install project dependencies
|
|
RUN pnpm install --frozen-lockfile --include=dev
|
|
|
|
# Copy the rest of the application code
|
|
COPY . .
|
|
|
|
# Build the application
|
|
RUN pnpm run build
|
|
|
|
# Production stage
|
|
FROM alpine:3.14
|
|
|
|
# Copy only the built artifacts from the build stage
|
|
COPY --from=build /app/dist /app/dist
|