mirror of
https://codeberg.org/JasterV/docker.git
synced 2026-04-26 18:10:02 +00:00
[release-plz] Make base image rust:alpine
This commit is contained in:
parent
f03e2140e1
commit
f2242a14a1
2 changed files with 10 additions and 29 deletions
|
|
@ -8,7 +8,7 @@ steps:
|
|||
image: plugins/kaniko
|
||||
settings:
|
||||
repo: jasterv/release-plz
|
||||
tags: 0.3,latest
|
||||
tags: 0.3.156,0.3,latest
|
||||
username:
|
||||
from_secret: DOCKERHUB_USERNAME
|
||||
password:
|
||||
|
|
|
|||
|
|
@ -1,35 +1,16 @@
|
|||
FROM rust:alpine AS builder
|
||||
FROM rust:alpine
|
||||
|
||||
# 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
|
||||
# Install system dependencies needed for git operations and the script
|
||||
RUN apk add --no-cache \
|
||||
git \
|
||||
curl \
|
||||
ca-certificates \
|
||||
libgcc \
|
||||
openssl
|
||||
openssl-dev \
|
||||
musl-dev \
|
||||
gcc
|
||||
|
||||
# Copy the binary from the builder stage
|
||||
COPY --from=builder /usr/local/cargo/bin/release-plz /usr/local/bin/release-plz
|
||||
# Download the pre-compiled release-plz binary (much faster than cargo install)
|
||||
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
|
||||
RUN release-plz --version
|
||||
|
||||
CMD ["release-plz", "--help"]
|
||||
# Verify tools are ready
|
||||
RUN cargo --version && release-plz --version
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue