Initial commit for CI pipeline test.
This commit is contained in:
23
docker/Dockerfile
Normal file
23
docker/Dockerfile
Normal file
@@ -0,0 +1,23 @@
|
||||
FROM node:18-alpine AS builder
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package.json and install dependencies
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm ci
|
||||
|
||||
# Copy the rest of the app and build
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
# Stage 2: Minimal image for exporting build artifacts
|
||||
FROM alpine:latest
|
||||
|
||||
# Set working directory for output
|
||||
WORKDIR /output
|
||||
|
||||
# Copy the built files from the builder stage
|
||||
COPY --from=builder /app/build .
|
||||
|
||||
# No CMD because this image is just used to extract build files
|
||||
Reference in New Issue
Block a user