fix: change cargo packages installation
try to download release biniaries instead of compiling them with the help of carg-binstall
This commit is contained in:
parent
690d9d3f6b
commit
26b3689027
1 changed files with 7 additions and 3 deletions
|
|
@ -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 \
|
||||
&& 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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue