git-git
SUCCESS
3m 16s
History Source
SummaryIterations1Transcript5Dockerfile
Dockerfile29 lines · 890 chars
# Auto-generated Dockerfile to build the static Rust library for gitcore
# Build stage: compile the static library libgitcore.a using a Rust toolchain
FROM rust:1.94.0-slim-trixie AS builder

WORKDIR /workspace

# Install required system dependencies
RUN apt-get update \
    && apt-get install -y --no-install-recommends build-essential ca-certificates \
    && rm -rf /var/lib/apt/lists/*

# Copy source and build
COPY . .

RUN cargo build --release

# Final stage: provide a minimal runtime environment that exposes the built library
FROM debian:bookworm-slim

# Copy the static library from the builder stage
COPY --from=builder /workspace/target/release/libgitcore.a /usr/local/lib/libgitcore.a

# Ensure the library location exists and is readable
RUN mkdir -p /usr/local/lib \
    && chmod 644 /usr/local/lib/libgitcore.a

# Keep the container alive but do nothing
CMD ["/bin/true"]