Spaces:
Running
Running
File size: 906 Bytes
c216121 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | # Multi-stage build for solverforge-fsr.
#
# The app depends on published crates.io packages, so the repository root is the
# complete Docker build context:
# docker build -f Dockerfile -t solverforge-fsr .
FROM rust:1.95-alpine AS builder
RUN apk add --no-cache musl-dev
WORKDIR /build
COPY Cargo.toml Cargo.lock ./
COPY src/ ./src/
COPY static/ ./static/
COPY solver.toml ./solver.toml
COPY solverforge.app.toml ./solverforge.app.toml
RUN cargo build --release --target x86_64-unknown-linux-musl
FROM alpine:latest
RUN apk add --no-cache ca-certificates
WORKDIR /app
COPY --from=builder /build/target/x86_64-unknown-linux-musl/release/solverforge_fsr ./solverforge_fsr
COPY --from=builder /build/static/ ./static/
COPY --from=builder /build/solver.toml ./solver.toml
COPY --from=builder /build/solverforge.app.toml ./solverforge.app.toml
ENV PORT=7860
EXPOSE 7860
CMD ["./solverforge_fsr"]
|