This commit is contained in:
Pierre
2026-05-25 23:49:32 +02:00
parent 99f9ef6228
commit f1107d129c
+8 -5
View File
@@ -1,19 +1,22 @@
# MetaMesh Plugin: full-hash (Rust) # MetaMesh Plugin: full-hash (Rust)
# High-performance file hashing with multi-algorithm support # High-performance file hashing with multi-algorithm support
FROM rust:1.83-slim AS builder FROM rust:1.89-slim-bookworm AS builder
WORKDIR /app WORKDIR /app
# Install build dependencies # Install build dependencies
RUN apt-get update && apt-get install -y pkg-config libssl-dev && rm -rf /var/lib/apt/lists/* RUN apt-get update && apt-get install -y pkg-config libssl-dev && rm -rf /var/lib/apt/lists/*
# Copy manifests and build dependencies first (for caching) # Copy manifests and build dependencies first (for caching).
COPY Cargo.toml ./ # Cargo.lock is copied so the build uses the committed, reproducible
RUN mkdir src && echo "fn main() {}" > src/main.rs && cargo build --release && rm -rf src # dependency set instead of re-resolving to the latest crates (which can
# pull in versions requiring a newer Rust edition than this toolchain).
COPY Cargo.toml Cargo.lock ./
RUN mkdir src && echo "fn main() {}" > src/main.rs && cargo build --release --locked && rm -rf src
# Copy source and build # Copy source and build
COPY src/ ./src/ COPY src/ ./src/
RUN touch src/main.rs && cargo build --release RUN touch src/main.rs && cargo build --release --locked
FROM debian:bookworm-slim FROM debian:bookworm-slim
WORKDIR /app WORKDIR /app