diff --git a/Dockerfile b/Dockerfile index d2c7577..dedb61e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,24 +15,18 @@ COPY . . # Build the frontend with Vite and compile the server to executable RUN bun run build -# Minimal production stage using Alpine -FROM alpine:latest - -# Install CA certificates for HTTPS requests and glibc compatibility -RUN apk --no-cache add ca-certificates tzdata gcompat +# Minimal production stage using Google's distroless image (glibc-based) +FROM gcr.io/distroless/cc-debian12 WORKDIR /app -# Copy the compiled executable from the build stage (Linux build will not have .exe extension) +# Copy the compiled executable from the build stage COPY --from=builder /app/dist/server /app/server # Copy the built frontend assets (but ensure we don't overwrite the server executable) COPY --from=builder /app/dist/*.html /app/dist/ COPY --from=builder /app/dist/assets /app/dist/assets -# Make the server executable -RUN chmod +x /app/server - # Expose the port EXPOSE 3000 @@ -40,4 +34,4 @@ EXPOSE 3000 ENV NODE_ENV=production # Start the application using the compiled executable -CMD ["/app/server"] \ No newline at end of file +CMD ["/app/server"]