fix: change cargo packages installation
Some checks failed
Publish image / Generate job matrices (push) Successful in 11s
Publish image / create-docker-images (map[name:devbox path:boxes/devbox]) (push) Failing after 31m51s

try to download release biniaries instead of compiling them with the help of carg-binstall
This commit is contained in:
Alexander Navarro 2024-11-08 11:52:30 -03:00
parent 690d9d3f6b
commit e05f690b61
Signed by untrusted user who does not match committer: anavarro
GPG key ID: 6426043E9FA3E3B5

View file

@ -1,11 +1,15 @@
FROM rust:latest AS rust-builder
FROM rust:alpine AS rust-builder
# setup cargo packages, prefer to use apk packages
# to reduce build time and space
RUN --mount=type=cache,target=/app/target/ \
RUN \
--mount=type=cache,target=/var/cache/apk/ \
--mount=type=cache,target=/app/target/ \
--mount=type=cache,target=/usr/local/cargo/git/db \
--mount=type=cache,target=/usr/local/cargo/registry/ \
cargo install --locked \
apk add bash curl build-base openssl-dev \
&& curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash \
&& cargo binstall --no-confirm \
cocogitto \
yazi-fm yazi-cli \
tealdeer