Deploy failed on the VPS:
error: rustc 1.88.0 is not supported by the following packages:
[email protected].0 requires rustc 1.89.0
No Cargo.lock is committed, so cargo resolves the newest crates on every
build; the transitive MSRV has moved past the 1.88 builder. Bump to
rust:1.90-bookworm (>= uuid 1.28's required 1.89).
20 lines
778 B
Docker
20 lines
778 B
Docker
# syntax=docker/dockerfile:1.7
|
|
# rustc 1.89+ required: latest transitive deps (e.g. uuid 1.28) set MSRV 1.89.
|
|
# No Cargo.lock is committed, so the resolver picks the newest crates on every
|
|
# build — keep this tag >= the current MSRV of the dependency tree.
|
|
FROM rust:1.90-bookworm AS builder
|
|
WORKDIR /build
|
|
ENV CARGO_BUILD_JOBS=2
|
|
COPY Cargo.toml Cargo.lock* ./
|
|
RUN mkdir src && echo "fn main() {}" > src/main.rs && cargo build --release && rm -rf src
|
|
COPY . .
|
|
RUN touch src/main.rs && cargo build --release
|
|
|
|
FROM debian:12-slim
|
|
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates && rm -rf /var/lib/apt/lists/*
|
|
WORKDIR /app
|
|
COPY --from=builder /build/target/release/backend /app/backend
|
|
ENV BIND_ADDR=0.0.0.0:8080
|
|
EXPOSE 8080
|
|
CMD ["/app/backend"]
|