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-07-04 02:08:26 +02:00
FROM oven/bun@sha256:2cdd9c93006af1b433c214016d72a3c60d7aa2c75691cb44dfd5250aa379986b 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-07-04 02:08:26 +02:00
FROM cgr.dev/chainguard/nginx@sha256:2f931ad91a9380f345f53f4275ca1f918486766da4f53fa6c0457fc11e0eb8fc 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;"]