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-06-08 02:02:17 +02:00
FROM oven/bun@sha256:8b5e8d3b6a734ae438c7c6f1bdc23e54eb9c35a0e2e3099ea2ca0ef781aca23b 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-06-08 02:02:17 +02:00
FROM cgr.dev/chainguard/nginx@sha256:8112d3ffcd91c90015f88bc1decadbb4f78cd7d6e5808f45ed8b62140236379c 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;"]