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

24 lines
413 B
Docker
Raw Normal View History

# Build stage
FROM rust:1.88.0 AS builder
WORKDIR /app
2025-07-19 14:00:47 -04:00
COPY ./public ./public
COPY ./cache ./cache
RUN cargo build --release --manifest-path ./public/Cargo.toml
# 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
EXPOSE 3000
CMD ["/app/public"]