# Originally from: https://github.com/devcontainers/images/blob/main/src/javascript-node/.devcontainer/Dockerfile # [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 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