From 64041cfd9c4e1799d4dea0aea404cd051bbd749a Mon Sep 17 00:00:00 2001 From: dzu Date: Fri, 13 Feb 2026 11:43:30 +0000 Subject: [PATCH 1/2] move package management before Rust installation - installed packages are less likely to change (?) might consider separating into update and package add stages - Rust installation requires `curl`, which is not available by default --- Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8134e20..63a14d6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,17 +2,17 @@ FROM git.dzuchun.ing/actions/alpine AS builder ENV PATH="/root/.cargo/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" +# update package registry, install +# - deps necessary(?) to build-std on musl +# - upx +RUN apk update; apk add --no-cache libunwind-static; apk add --no-cache xz-static; apk add --no-cache upx; apk cache clean + # install Rust RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh; \ chmod +x rustup.sh; \ ./rustup.sh toolchain install stable -c cargo --profile minimal -y; \ ./rustup.sh toolchain install nightly -c cargo --profile minimal -y; -# update package registry, install -# - deps necessary(?) to build-std on musl -# - upx -RUN apk update; apk add --no-cache libunwind-static; apk add --no-cache xz-static; apk add --no-cache upx; apk cache clean - # separate step to remove layers FROM git.dzuchun.ing/actions/alpine From 98dabe5994e3b4b5fa04e4de69f1fd99c29a8cbe Mon Sep 17 00:00:00 2001 From: dzu Date: Fri, 13 Feb 2026 11:45:36 +0000 Subject: [PATCH 2/2] fix: rust installation needs curl literally the first command in the script, duh --- Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 63a14d6..8ec7d3c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,10 +8,12 @@ ENV PATH="/root/.cargo/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/us RUN apk update; apk add --no-cache libunwind-static; apk add --no-cache xz-static; apk add --no-cache upx; apk cache clean # install Rust -RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh; \ +RUN apk add --no-cache curl; \ + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh; \ chmod +x rustup.sh; \ ./rustup.sh toolchain install stable -c cargo --profile minimal -y; \ - ./rustup.sh toolchain install nightly -c cargo --profile minimal -y; + ./rustup.sh toolchain install nightly -c cargo --profile minimal -y; \ + apk del curl; # separate step to remove layers FROM git.dzuchun.ing/actions/alpine