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-08-19 02:01:25 +02:00
FROM oven/bun@sha256:78f46b81b82d767ee8d729411f6f95089a403c21f17c20a5789df00263d7c5b5 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-08-19 02:01:25 +02:00
FROM cgr.dev/chainguard/nginx@sha256:0b928991f927105c184aa1b97b040e713501f0870dde662d2ff311325972f57b 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;"]