Compare commits

...
Author SHA1 Message Date
dzu
98dabe5994 fix: rust installation needs curl
Some checks failed
Upload the container / build-and-upload (push) Has been cancelled
literally the first command in the script, duh
2026-02-13 11:45:36 +00:00
dzu
64041cfd9c 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
2026-02-13 11:43:30 +00:00

View file

@ -2,17 +2,19 @@ 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"
# 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
# install Rust
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; \
apk del curl;
# separate step to remove layers
FROM git.dzuchun.ing/actions/alpine