mirror of
https://github.com/dockersrc/rust
synced 2026-06-24 14:01:04 -04:00
🐛 Switch probe-rs/sqlx-cli/sea-orm-cli to binstall prebuilt-only 🐛
Build and Push / build (push) Failing after 26m26s
Build and Push / build (push) Failing after 26m26s
All three tools were using bare `cargo install` with no binstall attempt, forcing full source compilation on every amd64-musl build. probe-rs took ~73 minutes, sqlx-cli and sea-orm-cli each ~82 minutes — totalling ~4 hours of source compilation that crashed the BuildKit container before the amd64 image could be assembled. All three publish x86_64-unknown-linux-musl prebuilts on GitHub releases. Switching to `cargo binstall -y --target ... 2>/dev/null || true` means: - amd64: prebuilt downloaded in seconds; source never attempted - arm64: no aarch64-musl prebuilt; binstall tries source, fails fast (ring/openssl missing musl cross-compile headers), || true skips it - Dockerfile: replace three `cargo install` lines with `cargo binstall` Dockerfile
This commit is contained in:
+3
-5
@@ -156,11 +156,9 @@ RUN --mount=type=cache,id=cargo-registry-native,sharing=shared,target=/usr/local
|
|||||||
cargo binstall -y --target "${RUST_TARGET}" samply 2>/dev/null || true; \
|
cargo binstall -y --target "${RUST_TARGET}" samply 2>/dev/null || true; \
|
||||||
cargo binstall -y --target "${RUST_TARGET}" flamegraph 2>/dev/null || \
|
cargo binstall -y --target "${RUST_TARGET}" flamegraph 2>/dev/null || \
|
||||||
cargo install --target "${RUST_TARGET}" flamegraph || true; \
|
cargo install --target "${RUST_TARGET}" flamegraph || true; \
|
||||||
cargo install --target "${RUST_TARGET}" probe-rs --features cli 2>/dev/null || true; \
|
cargo binstall -y --target "${RUST_TARGET}" probe-rs 2>/dev/null || true; \
|
||||||
cargo install --target "${RUST_TARGET}" sqlx-cli \
|
cargo binstall -y --target "${RUST_TARGET}" sqlx-cli 2>/dev/null || true; \
|
||||||
--no-default-features --features rustls,postgres,mysql,sqlite 2>/dev/null || true; \
|
cargo binstall -y --target "${RUST_TARGET}" sea-orm-cli 2>/dev/null || true
|
||||||
cargo install --target "${RUST_TARGET}" sea-orm-cli \
|
|
||||||
--no-default-features --features codegen,sqlx-mysql,sqlx-postgres,sqlx-sqlite,runtime-tokio-rustls 2>/dev/null || true
|
|
||||||
|
|
||||||
FROM ${PULL_URL}:${DISTRO_VERSION} AS build
|
FROM ${PULL_URL}:${DISTRO_VERSION} AS build
|
||||||
ARG TZ
|
ARG TZ
|
||||||
|
|||||||
Reference in New Issue
Block a user