toolchain-builder/Dockerfile-zig
Jacob Kiers 7a96634b5a Add option to use with zigbuild
Signed-off-by: Jacob Kiers <code@kiers.eu>
2024-02-22 16:36:20 +01:00

26 lines
951 B
Plaintext

FROM docker.io/library/rust:${RUST_VERSION}-slim
LABEL maintainer 'Jacob Kiers <code@kie.rs>'
ENV ZIG_VERSION=${ZIG_VERSION}
# Install zig, binstall and zigbuild
COPY zig/install-dependencies.sh /tmp/install-dependencies.sh
RUN chmod +x /tmp/install-dependencies.sh && /tmp/install-dependencies.sh && rm /tmp/install-dependencies.sh
# Install macOS SDKs
RUN curl -L "https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX10.9.sdk.tar.xz" | tar -J -x -C /opt
RUN curl -L "https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX11.3.sdk.tar.xz" | tar -J -x -C /opt
ENV SDKROOT=/opt/MacOSX11.3.sdk
# Install Rust targets
RUN rustup target add \
x86_64-unknown-linux-gnu \
x86_64-unknown-linux-musl \
aarch64-unknown-linux-gnu \
aarch64-unknown-linux-musl \
arm-unknown-linux-gnueabihf \
arm-unknown-linux-musleabihf \
x86_64-apple-darwin \
aarch64-apple-darwin \
x86_64-pc-windows-gnu