Files
my-website-v2/backend/public/Dockerfile
T

24 lines
413 B
Docker
Raw Normal View History

2025-12-21 15:36:00 -05:00
# Build stage
FROM rust:1.88.0 AS builder
2025-07-19 00:44:28 -04:00
WORKDIR /app
2025-07-19 14:00:47 -04:00
COPY ./public ./public
COPY ./cache ./cache
2025-07-19 00:44:28 -04:00
RUN cargo build --release --manifest-path ./public/Cargo.toml
2025-12-21 15:36:00 -05:00
# Runtime stage with Alpine
FROM alpine:latest
WORKDIR /app
RUN apk add --no-cache ca-certificates libgcc
COPY --from=builder /app/public/target/release/public /app/public
COPY --from=builder /app/cache ./cache
2025-07-19 00:44:28 -04:00
EXPOSE 3000
2025-12-21 15:36:00 -05:00
CMD ["/app/public"]