2021-11-13 11:37:03 +00:00
|
|
|
ARG ALPINE_ARCH
|
|
|
|
ARG DOCKER_ARCH
|
|
|
|
FROM --platform=linux/${DOCKER_ARCH} synit-build:${ALPINE_ARCH}
|
|
|
|
|
|
|
|
ARG http_proxy
|
2021-11-13 11:42:02 +00:00
|
|
|
RUN http_proxy=${http_proxy} https_proxy=${http_proxy} apk add rustup openssl-dev
|
|
|
|
|
2021-11-13 11:37:03 +00:00
|
|
|
# Running without proxy for now, to ensure reasonable freshness and consistency:
|
|
|
|
# RUN http_proxy=${http_proxy} https_proxy=${http_proxy} rustup-init -y --default-toolchain nightly
|
|
|
|
#
|
|
|
|
RUN rustup-init -y --default-toolchain nightly
|
|
|
|
|
|
|
|
ARG BUILD_USER
|
|
|
|
ENV PATH=/home/${BUILD_USER}/.cargo/bin:$PATH
|
|
|
|
|
|
|
|
# Prime the crates.io index
|
|
|
|
RUN cargo search --limit 0
|
|
|
|
|
|
|
|
# Hack to workaround https://github.com/rust-lang/rust/issues/89626
|
|
|
|
ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-Zgcc-ld=lld"
|