Files
Portfolio-Project/Dockerfile
copilot-swe-agent[bot] 2a1c07f8ff Add nginx stage for Docker build
Co-authored-by: coolestcoder655 <74312880+coolestcoder655@users.noreply.github.com>
2026-01-02 02:01:02 +00:00

26 lines
381 B
Docker

FROM node:22 AS builder
WORKDIR /app
# Copy package*.json
COPY package*.json .
# Install dependencies
RUN npm install
# Copy the rest of the application code
COPY . .
# Build the application
RUN npm run build
FROM nginx:alpine
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=builder /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]