Remove build process from docker file

This commit is contained in:
Pranav 2025-10-10 16:38:15 +05:30
parent 5491637703
commit c6dfb247b3

View File

@ -2,28 +2,13 @@
# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 18, 16, 14, 18-bullseye, 16-bullseye, 14-bullseye, 18-buster, 16-buster, 14-buster
ARG VARIANT=20-bullseye
# Build stage
FROM node:${VARIANT} AS builder
FROM node:${VARIANT}
WORKDIR /app
COPY . .
RUN yarn install
RUN yarn build
# Production stage
FROM node:${VARIANT}-slim AS production
# Create app directory
WORKDIR /app
# Copy built application from builder stage
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/package.json ./package.json
COPY --from=builder /app/yarn.lock ./yarn.lock
# Install only production dependencies
RUN yarn install --production
# Expose port for http
EXPOSE 4173