Fix: Use Rust latest (1.85+) for edition2024 support
Our dependencies (time-core, getrandom, uuid, etc.) now require Rust 1.85+ for edition2024 support. Changes: - Dockerfile.dev: Updated to rust:latest - Dockerfile.prod: Updated to rust:latest for builder stage This resolves the edition2024 compilation errors.
This commit is contained in:
parent
5e20e802f3
commit
860c2dc439
2 changed files with 7 additions and 10 deletions
|
|
@ -1,18 +1,15 @@
|
|||
FROM rust:1.83-alpine AS builder
|
||||
FROM rust:latest AS builder
|
||||
WORKDIR /app
|
||||
RUN apk add --no-cache musl-dev pkgconf openssl-dev
|
||||
COPY Cargo.toml ./
|
||||
RUN mkdir src && echo 'fn main() {}' > src/main.rs
|
||||
RUN cargo build --release && rm -rf src
|
||||
COPY src ./src
|
||||
RUN touch src/main.rs && cargo build --release
|
||||
RUN cargo build --release
|
||||
|
||||
FROM alpine:3.18
|
||||
WORKDIR /app
|
||||
RUN apk add --no-cache ca-certificates openssl wget
|
||||
COPY --from=builder /app/target/release/normogen-backend /app/normogen-backend
|
||||
RUN addgroup -g 1000 normogen && adduser -D -u 1000 -G normogen normogen && chown -R normogen:normogen /app
|
||||
USER normogen
|
||||
FROM alpine:latest
|
||||
RUN apk add --no-cache ca-certificates
|
||||
COPY --from=builder /app/target/release/normogen-backend /usr/local/bin/normogen-backend
|
||||
EXPOSE 8000
|
||||
HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 CMD wget --no-verbose --tries=1 --spider http://localhost:8000/health || exit 1
|
||||
CMD ["./normogen-backend"]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
FROM rust:1.83-alpine
|
||||
FROM rust:latest
|
||||
WORKDIR /app
|
||||
RUN apk add --no-cache musl-dev pkgconf openssl-dev curl wget git pkgconfig
|
||||
COPY Cargo.toml ./
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue