react-docker-optimization/Dockerfile

11 lines
440 B
Text
Raw Normal View History

2025-01-04 17:39:34 +01:00
# Build stage of the application
2025-11-15 01:03:17 +01:00
FROM oven/bun@sha256:30b6593d5646d1d695ed0c68c76ed370de538f5f49c34ed565386fd455bf6194 AS build
2025-01-04 17:39:34 +01:00
WORKDIR /app
COPY . .
2025-01-05 18:06:10 +01:00
RUN bun i && bun run build
2025-01-04 17:39:34 +01:00
# Production stage to run the application
2025-11-15 01:03:17 +01:00
FROM cgr.dev/chainguard/nginx@sha256:2d770db928ae2395c72e4c6e6e0e38ffb8313d9aa15fc8ce6fc70043db52a180 AS production
2025-01-05 18:06:10 +01:00
COPY --from=build /app/dist /usr/share/nginx/html
2025-01-06 19:42:13 +01:00
EXPOSE 8080
ENTRYPOINT ["nginx", "-g", "daemon off;"]