mirror of
https://codeberg.org/JasterV/docker.git
synced 2026-04-26 18:10:02 +00:00
35 lines
761 B
Docker
35 lines
761 B
Docker
FROM rust:alpine AS builder
|
|
|
|
# Install build dependencies for Rust crates
|
|
RUN apk add --no-cache \
|
|
musl-dev \
|
|
gcc \
|
|
perl \
|
|
make \
|
|
openssl-dev \
|
|
pkgconfig
|
|
|
|
# Install release-plz
|
|
RUN cargo install release-plz --version 0.3.156
|
|
|
|
# Final lightweight image
|
|
FROM alpine:latest
|
|
|
|
# Install runtime dependencies
|
|
# curl: for the API calls in your script
|
|
# git: for release-plz to commit/push
|
|
# ca-certificates: so curl/git can verify HTTPS connections
|
|
RUN apk add --no-cache \
|
|
git \
|
|
curl \
|
|
ca-certificates \
|
|
libgcc \
|
|
openssl
|
|
|
|
# Copy the binary from the builder stage
|
|
COPY --from=builder /usr/local/cargo/bin/release-plz /usr/local/bin/release-plz
|
|
|
|
# Verify installation
|
|
RUN release-plz --version
|
|
|
|
CMD ["release-plz", "--help"]
|