rust: add registry in root as well

This commit is contained in:
Ryan Heywood 2024-02-05 21:03:14 -05:00
parent 9217bd350c
commit 0ddfd4c24e
Signed by: ryan
GPG Key ID: 8E401478A3FBEF72
1 changed files with 3 additions and 1 deletions

View File

@ -116,7 +116,7 @@ RUN tar -xzf rustc-${VERSION}-src.tar.gz
WORKDIR rustc-${VERSION}-src
COPY --from=rust . /
# Required by Rust >= 1.75.0
RUN mkdir -p /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/
RUN mkdir -p $HOME/.cargo/registry/src/index.crates.io-6f17d22bba15001f/
RUN set -eux; \
./configure \
--build="x86_64-unknown-linux-musl" \
@ -158,6 +158,8 @@ RUN set -eux; \
FROM build as install
USER 0:0
# Required by Rust >= 1.75.0
RUN mkdir -p /.cargo/registry/src/index.crates.io-6f17d22bba15001f/
RUN set -eux; \
python3 x.py install; \
cd /rootfs/usr/lib/rustlib; \