fix: Switch Dockerfile to Debian-based Rust image for 1.88+ support

Dependencies require Rust 1.88. Alpine images lag behind. Switched
to rust:latest (Debian) for build and debian:bookworm-slim for runtime.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Vantz Stockwell
2026-02-15 00:51:27 -05:00
parent c20ed2d384
commit ef5ee0f844

View File

@@ -1,8 +1,8 @@
# Multi-stage build for Corrosion API
# Stage 1: Build the Rust binary
FROM rust:1.85-alpine AS builder
FROM rust:latest AS builder
RUN apk add --no-cache musl-dev pkgconfig openssl-dev openssl-libs-static
RUN apt-get update && apt-get install -y pkg-config libssl-dev && rm -rf /var/lib/apt/lists/*
WORKDIR /build
@@ -18,9 +18,9 @@ COPY migrations/ migrations/
RUN touch src/main.rs && cargo build --release
# Stage 2: Runtime image
FROM alpine:3.20
FROM debian:bookworm-slim
RUN apk add --no-cache ca-certificates
RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/*
WORKDIR /app