mirror of
https://github.com/dockersrc/rust
synced 2026-08-09 02:01:13 -04:00
📝 Fix stale compile-stage comments in Dockerfile 📝
Comments still described the old native-cross-compile fallback that was removed when the rust-tools stage switched to cargo binstall --disable-strategies compile (prebuilt-only). - Dockerfile: update rust-tools stage header comment to describe prebuilt-fetch behavior instead of native compilation - Dockerfile: update comment above the rust-tools COPY to say "fetched as prebuilts" instead of "compiled natively"
This commit is contained in:
+7
-6
@@ -31,12 +31,13 @@ ARG BUILD_VERSION="${BUILD_DATE}"
|
|||||||
|
|
||||||
FROM tianon/gosu:latest AS gosu
|
FROM tianon/gosu:latest AS gosu
|
||||||
|
|
||||||
# ─── native cross-compile stage ───────────────────────────────────────────────
|
# ─── native prebuilt-fetch stage ──────────────────────────────────────────────
|
||||||
# Mirrors the go-tools pattern: runs on the build platform (always native amd64
|
# Mirrors the go-tools pattern: runs on the build platform (always native amd64
|
||||||
# in CI). For arm64 targets the musl cross-toolchain compiles natively instead
|
# in CI). Tool binaries are fetched as prebuilts for the target arch — no
|
||||||
# of under QEMU — turning a 15-hour emulated build into a 30-60 minute one.
|
# compilation, no QEMU — turning a 15-hour emulated build into minutes.
|
||||||
# cargo binstall --target fetches prebuilt binaries from GitHub releases;
|
# cargo binstall --disable-strategies compile fetches prebuilt binaries from
|
||||||
# for tools without prebuilts it falls back to native cross-compilation.
|
# GitHub releases only; tools without a prebuilt for the target arch are
|
||||||
|
# skipped rather than compiled from source.
|
||||||
FROM --platform=$BUILDPLATFORM rust:alpine AS rust-tools
|
FROM --platform=$BUILDPLATFORM rust:alpine AS rust-tools
|
||||||
ARG TARGETARCH
|
ARG TARGETARCH
|
||||||
|
|
||||||
@@ -283,7 +284,7 @@ RUN echo "Custom Applications"; \
|
|||||||
$SHELL_OPTS; \
|
$SHELL_OPTS; \
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
# Target-arch tool binaries compiled natively in the rust-tools stage;
|
# Target-arch tool binaries fetched as prebuilts in the rust-tools stage;
|
||||||
# copied here before 05-custom.sh runs so the symlink loop picks them up
|
# copied here before 05-custom.sh runs so the symlink loop picks them up
|
||||||
COPY --from=rust-tools /rust-tools/bin/ /usr/local/share/cargo/bin/
|
COPY --from=rust-tools /rust-tools/bin/ /usr/local/share/cargo/bin/
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user