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
b0097f4450
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
|
# setup cargo packages, prefer to use apk packages
|
||||||
# to reduce build time and space
|
# 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/git/db \
|
||||||
--mount=type=cache,target=/usr/local/cargo/registry/ \
|
--mount=type=cache,target=/usr/local/cargo/registry/ \
|
||||||
cargo install --locked \
|
apk add bash curl build-essentials 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 \
|
cocogitto \
|
||||||
yazi-fm yazi-cli \
|
yazi-fm yazi-cli \
|
||||||
tealdeer
|
tealdeer
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue