[release-plz] Make base image rust:alpine

This commit is contained in:
JasterV 2026-03-06 21:26:33 +01:00
parent f03e2140e1
commit f2242a14a1
2 changed files with 10 additions and 29 deletions

View file

@ -8,7 +8,7 @@ steps:
image: plugins/kaniko image: plugins/kaniko
settings: settings:
repo: jasterv/release-plz repo: jasterv/release-plz
tags: 0.3,latest tags: 0.3.156,0.3,latest
username: username:
from_secret: DOCKERHUB_USERNAME from_secret: DOCKERHUB_USERNAME
password: password:

View file

@ -1,35 +1,16 @@
FROM rust:alpine AS builder FROM rust:alpine
# Install build dependencies for Rust crates # Install system dependencies needed for git operations and the script
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 \ RUN apk add --no-cache \
git \ git \
curl \ curl \
ca-certificates \ ca-certificates \
libgcc \ openssl-dev \
openssl musl-dev \
gcc
# Copy the binary from the builder stage # Download the pre-compiled release-plz binary (much faster than cargo install)
COPY --from=builder /usr/local/cargo/bin/release-plz /usr/local/bin/release-plz RUN curl -fsSL https://github.com/release-plz/release-plz/releases/download/release-plz-v0.3.156/release-plz-x86_64-unknown-linux-musl.tar.gz | tar -xz -C /usr/local/bin
# Verify installation # Verify tools are ready
RUN release-plz --version RUN cargo --version && release-plz --version
CMD ["release-plz", "--help"]