Files
my-website-v2/backend/public/Dockerfile
Wyatt J. Miller 5396d44189
Some checks failed
Build and Release Docker Images / build-and-push (./backend, public/Dockerfile, my-website-v2_public) (pull_request) Failing after 23m10s
Build and Release Docker Images / build-and-push (./backend, task/Dockerfile, my-website-v2_task) (pull_request) Failing after 24m49s
Build and Release Docker Images / build-and-push (./frontend, Dockerfile, my-website-v2_frontend) (pull_request) Failing after 20m2s
Build and Release Docker Images / create-release (pull_request) Has been skipped
added multi stage builds for oci containers
it should help from builds from failing in addition to slimming down the
artifact size
2025-12-21 15:36:00 -05:00

24 lines
413 B
Docker

# Build stage
FROM rust:1.88.0 AS builder
WORKDIR /app
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"]