rust-linux-darwin-builder (2.0.0-beta.2-libs-amd64)

Published 2026-04-08 23:45:22 -05:00 by miles in miles/rust-linux-darwin-builder

Installation

docker pull git.richey.dev/miles/rust-linux-darwin-builder:2.0.0-beta.2-libs-amd64
sha256:151a8e4e0eec45a7a9c33ce1fcc59668220c1363ec23e0031be783666beda3c0

Image layers

# debian.sh --arch 'amd64' out/ 'trixie' '@1759104000'
ARG VERSION=0.0.0
ARG OSX_SDK_VERSION=13.3
ARG OSX_SDK_SUM=518e35eae6039b3f64e8025f4525c1c43786cc5cf39459d609852faf091e34be
ARG OSX_VERSION_MIN=10.14
ARG OSX_CROSS_COMMIT=f873f534c6cdb0776e457af8c7513da1e02abe59
WORKDIR /usr/local/osxcross
RUN |5 VERSION=0.0.0 OSX_SDK_VERSION=13.3 OSX_SDK_SUM=518e35eae6039b3f64e8025f4525c1c43786cc5cf39459d609852faf091e34be OSX_VERSION_MIN=10.14 OSX_CROSS_COMMIT=f873f534c6cdb0776e457af8c7513da1e02abe59 /bin/sh -c set -eux && dpkg --add-architecture arm64 && DEBIAN_FRONTEND=noninteractive apt-get update -qq && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests autoconf automake bison build-essential ca-certificates clang cmake curl file git libbz2-dev libssl-dev libxml2-dev pkgconf python3 xutils-dev xz-utils zlib1g-dev && apt-get clean && rm -rf /var/lib/apt/lists/* && true # buildkit
RUN |5 VERSION=0.0.0 OSX_SDK_VERSION=13.3 OSX_SDK_SUM=518e35eae6039b3f64e8025f4525c1c43786cc5cf39459d609852faf091e34be OSX_VERSION_MIN=10.14 OSX_CROSS_COMMIT=f873f534c6cdb0776e457af8c7513da1e02abe59 /bin/sh -c set -eux && echo "Cloning osxcross..." && git clone --depth 10 --branch master https://github.com/tpoechtrager/osxcross.git /usr/local/osxcross && git checkout -q "${OSX_CROSS_COMMIT}" && rm -rf ./.git && true # buildkit
RUN |5 VERSION=0.0.0 OSX_SDK_VERSION=13.3 OSX_SDK_SUM=518e35eae6039b3f64e8025f4525c1c43786cc5cf39459d609852faf091e34be OSX_VERSION_MIN=10.14 OSX_CROSS_COMMIT=f873f534c6cdb0776e457af8c7513da1e02abe59 /bin/sh -c set -eux && curl -sSL -o "./tarballs/MacOSX${OSX_SDK_VERSION}.sdk.tar.xz" "https://github.com/joseluisq/macosx-sdks/releases/download/${OSX_SDK_VERSION}/MacOSX${OSX_SDK_VERSION}.sdk.tar.xz" && echo "${OSX_SDK_SUM} ./tarballs/MacOSX${OSX_SDK_VERSION}.sdk.tar.xz" | sha256sum -c - && UNATTENDED=yes OSX_VERSION_MIN=${OSX_VERSION_MIN} ./build.sh && cd /usr/local/osxcross/build/apple-libtapi/src/llvm && rm -rf benchmarks examples unittests && rm -rf ./tarballs *.tar.xz /tmp/* && true # buildkit
RUN |5 VERSION=0.0.0 OSX_SDK_VERSION=13.3 OSX_SDK_SUM=518e35eae6039b3f64e8025f4525c1c43786cc5cf39459d609852faf091e34be OSX_VERSION_MIN=10.14 OSX_CROSS_COMMIT=f873f534c6cdb0776e457af8c7513da1e02abe59 /bin/sh -c set -eux && cd /usr/local/osxcross && echo "Building osxcross with compiler-rt..." && env DISABLE_PARALLEL_ARCH_BUILD=1 ./build_compiler_rt.sh && cd /usr/local/osxcross/build/compiler-rt/llvm && rm -rf test unittests benchmarks examples docs && cd /usr/local/osxcross/build/compiler-rt/clang && rm -rf test unittests docs examples && rm -rf /tmp/* && true # buildkit
ENV VERSION=0.0.0
ENV OSX_SDK_VERSION=13.3
ENV OSX_SDK_SUM=518e35eae6039b3f64e8025f4525c1c43786cc5cf39459d609852faf091e34be
ENV OSX_VERSION_MIN=10.14
ENV OSX_CROSS_COMMIT=f873f534c6cdb0776e457af8c7513da1e02abe59
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/osxcross/target/bin
ENV MACOSX_DEPLOYMENT_TARGET=10.14
ENV OSXCROSS_MACPORTS_MIRROR=https://packages.macports.org
ENV OSXCROSS_MACPORTS_LOCAL=/usr/local/osxcross/target/macports/pkgs/opt/local
ENV OSXCROSS_MACPORTS_LIBEXEC=/usr/local/osxcross/target/macports/pkgs/opt/local/libexec
ENV PKG_CONFIG_ALLOW_CROSS=true
ENV PKG_CONFIG_ALL_STATIC=true
RUN |5 VERSION=0.0.0 OSX_SDK_VERSION=13.3 OSX_SDK_SUM=518e35eae6039b3f64e8025f4525c1c43786cc5cf39459d609852faf091e34be OSX_VERSION_MIN=10.14 OSX_CROSS_COMMIT=f873f534c6cdb0776e457af8c7513da1e02abe59 /bin/sh -c set -eux && echo "Testing osxcross with compiler-rt..." && echo "int main(void){return 0;}" | xcrun clang -xc -o/dev/null -v - 2>&1 | grep "libclang_rt" 1>/dev/null && echo "compiler-rt installed and woking successfully!" && true # buildkit
LABEL version=0.0.0 description=Linux AMD64 Docker image for osxcross maintainer=Jose Quintana <joseluisq.net> org.opencontainers.image.vendor=Jose Quintana org.opencontainers.image.url=https://github.com/joseluisq/docker-osxcross org.opencontainers.image.title=Docker OSXCross org.opencontainers.image.description=Linux AMD64 Docker image for osxcross. org.opencontainers.image.version=0.0.0 org.opencontainers.image.documentation=https://github.com/joseluisq/docker-osxcross
WORKDIR /root/src
CMD ["bash"]
LABEL version=0.0.0 description=Docker image for cross-compiling Rust programs for Linux (musl libc) & macOS (osxcross). maintainer=Jose Quintana <joseluisq.net>
ARG VERSION=2.0.0-beta.2-amd64
ENV VERSION=2.0.0-beta.2-amd64
ARG TOOLCHAIN=1.94.1
RUN |2 VERSION=2.0.0-beta.2-amd64 TOOLCHAIN=1.94.1 /bin/sh -c set -eux && dpkg --add-architecture arm64 && DEBIAN_FRONTEND=noninteractive apt-get update -qq && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests musl-dev musl-dev:arm64 musl-tools gcc-aarch64-linux-gnu g++-aarch64-linux-gnu && apt-get clean && rm -rf /var/lib/apt/lists/* && true # buildkit
RUN |2 VERSION=2.0.0-beta.2-amd64 TOOLCHAIN=1.94.1 /bin/sh -c set -eux && ln -s "/usr/bin/g++" "/usr/bin/musl-g++" && mkdir -p /root/libs /root/src && true # buildkit
ENV PATH=/root/.cargo/bin:/usr/local/musl/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/osxcross/target/bin
ENV TARGET=musl
ENV PKG_CONFIG_ALLOW_CROSS=1
ENV PKG_CONFIG_ALL_STATIC=1
RUN |2 VERSION=2.0.0-beta.2-amd64 TOOLCHAIN=1.94.1 /bin/sh -c set -eux && curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain=$TOOLCHAIN && rustup target add aarch64-apple-darwin aarch64-unknown-linux-gnu aarch64-unknown-linux-musl x86_64-apple-darwin x86_64-unknown-linux-musl x86_64-unknown-linux-gnu && true # buildkit
COPY docker/amd64/base/cargo.toml /root/.cargo/config.toml # buildkit
RUN |2 VERSION=2.0.0-beta.2-amd64 TOOLCHAIN=1.94.1 /bin/sh -c set -eux && rustc -vV && cargo -vV && true # buildkit
WORKDIR /root/src
CMD ["bash"]
LABEL version=2.0.0-beta.2-amd64 description=Docker image for cross-compiling Rust programs for Linux (musl libc) & macOS (osxcross). maintainer=Jose Quintana <joseluisq.net>
ENV VERSION=2.0.0-beta.2-amd64
ARG ZLIB_VERSION=1.3.1
ENV LIBZ_SYS_STATIC=1
WORKDIR /tmp
RUN |1 ZLIB_VERSION=1.3.1 /bin/sh -c set -eux && echo "Downloading zlib ${ZLIB_VERSION}..." && curl -Lo zlib.tar.gz "https://www.zlib.net/fossils/zlib-${ZLIB_VERSION}.tar.gz" && true # buildkit
RUN |1 ZLIB_VERSION=1.3.1 /bin/sh -c set -eux && mkdir zlib && tar -xvf zlib.tar.gz --strip-components=1 -C ./zlib && cd zlib && make distclean && CC=gcc ./configure --prefix=/usr/local/x86_64-linux-gnu && make -j$(nproc) && make install && cd .. && rm -rf zlib && true # buildkit
RUN |1 ZLIB_VERSION=1.3.1 /bin/sh -c set -eux && mkdir zlib && tar -xvf zlib.tar.gz --strip-components=1 -C ./zlib && cd zlib && make distclean && CC=aarch64-linux-gnu-gcc ./configure --prefix=/usr/local/aarch64-linux-gnu && make -j$(nproc) && make install && cd .. && rm -rf zlib && true # buildkit
RUN |1 ZLIB_VERSION=1.3.1 /bin/sh -c set -eux && mkdir zlib && tar -xvf zlib.tar.gz --strip-components=1 -C ./zlib && cd zlib && make distclean && CC=musl-gcc ./configure --static --prefix=/usr/local/x86_64-linux-musl && make -j$(nproc) && make install && cd .. && rm -rf zlib zlib.tar.gz && true # buildkit
WORKDIR /tmp
ARG OPENSSL_VERSION=3.5.4
RUN |2 ZLIB_VERSION=1.3.1 OPENSSL_VERSION=3.5.4 /bin/sh -c set -eux && curl -LO "https://github.com/openssl/openssl/releases/download/openssl-${OPENSSL_VERSION}/openssl-${OPENSSL_VERSION}.tar.gz" && true # buildkit
RUN |2 ZLIB_VERSION=1.3.1 OPENSSL_VERSION=3.5.4 /bin/sh -c set -eux && tar xvzf "openssl-${OPENSSL_VERSION}.tar.gz" && cd "openssl-${OPENSSL_VERSION}" && echo "Building OpenSSL ${OPENSSL_VERSION} for x86_64..." && ls /usr/include/linux && mkdir -p /usr/local/x86_64-linux-musl/include && ln -s /usr/include/linux /usr/local/x86_64-linux-musl/include/linux && ln -s "/usr/include/x86_64-linux-gnu/asm" /usr/local/x86_64-linux-musl/include/asm && ln -s /usr/include/asm-generic /usr/local/x86_64-linux-musl/include/asm-generic && env CC=musl-gcc ./Configure no-shared no-zlib -fPIC --prefix=/usr/local/x86_64-linux-musl -DOPENSSL_NO_SECURE_MEMORY "linux-x86_64" && env C_INCLUDE_PATH=/usr/local/x86_64-linux-musl/include/ make depend && env C_INCLUDE_PATH=/usr/local/x86_64-linux-musl/include/ make -j$(nproc) && make -j$(nproc) install_sw && make -j$(nproc) install_ssldirs && openssl version && rm -rf /usr/local/x86_64-linux-musl/include/linux /usr/local/x86_64-linux-musl/include/asm /usr/local/x86_64-linux-musl/include/asm-generic && ls -l /usr/local/x86_64-linux-musl && if ! [ -d /usr/local/x86_64-linux-musl/lib ]; then ln -s /usr/local/x86_64-linux-musl/lib64 /usr/local/x86_64-linux-musl/lib; else mv /usr/local/x86_64-linux-musl/lib /usr/local/x86_64-linux-musl/abc; mv /usr/local/x86_64-linux-musl/lib64 /usr/local/x86_64-linux-musl/lib; cp -rp /usr/local/x86_64-linux-musl/abc/. /usr/local/x86_64-linux-musl/lib/; unlink /usr/local/x86_64-linux-musl/lib/lib64; rm -rf /usr/local/x86_64-linux-musl/abc; fi && cd .. && rm -rf "openssl-${OPENSSL_VERSION}" && true # buildkit
RUN |2 ZLIB_VERSION=1.3.1 OPENSSL_VERSION=3.5.4 /bin/sh -c set -eux && tar xvzf "openssl-${OPENSSL_VERSION}.tar.gz" && cd "openssl-${OPENSSL_VERSION}" && echo "Building OpenSSL ${OPENSSL_VERSION} for aarch64..." && ls /usr/include/linux && mkdir -p /usr/local/aarch64-linux-gnu/include && env CC=aarch64-linux-gnu-gcc ./Configure no-shared no-zlib -fPIC --prefix=/usr/local/aarch64-linux-gnu -DOPENSSL_NO_SECURE_MEMORY -mno-outline-atomics "linux-aarch64" && env C_INCLUDE_PATH=/usr/local/aarch64-linux-gnu/include/ make depend && env C_INCLUDE_PATH=/usr/local/aarch64-linux-gnu/include/ make -j$(nproc) && make -j$(nproc) install_sw && make -j$(nproc) install_ssldirs && openssl version && rm -rf /usr/local/aarch64-linux-gnu/include/linux /usr/local/aarch64-linux-gnu/include/asm /usr/local/aarch64-linux-gnu/include/asm-generic && ls -l /usr/local/aarch64-linux-gnu && cd .. && rm -rf "openssl-${OPENSSL_VERSION}" && true # buildkit
RUN |2 ZLIB_VERSION=1.3.1 OPENSSL_VERSION=3.5.4 /bin/sh -c set -eux && tar xvzf "openssl-${OPENSSL_VERSION}.tar.gz" && cd "openssl-${OPENSSL_VERSION}" && echo "Building OpenSSL ${OPENSSL_VERSION} for MACOS aarch64..." && mkdir -p /usr/local/aarch64-apple-darwin/include && env CC=oa64-clang ./Configure no-asm no-shared no-zlib no-tests no-fuzz-libfuzzer no-fuzz-afl -fPIC --prefix=/usr/local/aarch64-apple-darwin -DOPENSSL_NO_SECURE_MEMORY "darwin64-arm64-cc" && make -j$(nproc) build_libs && make -j$(nproc) install_dev && rm -rf /usr/local/aarch64-apple-darwin/include/asm /usr/local/aarch64-apple-darwin/include/asm-generic && ls -l /usr/local/aarch64-apple-darwin && cd .. && rm -rf "openssl-${OPENSSL_VERSION}" && true # buildkit
RUN |2 ZLIB_VERSION=1.3.1 OPENSSL_VERSION=3.5.4 /bin/sh -c set -eux && tar xvzf "openssl-${OPENSSL_VERSION}.tar.gz" && cd "openssl-${OPENSSL_VERSION}" && echo "Building OpenSSL ${OPENSSL_VERSION} for MACOS x86_64..." && mkdir -p /usr/local/x86_64-apple-darwin/include && env CC=o64-clang ./Configure no-asm no-shared no-zlib no-tests no-fuzz-libfuzzer no-fuzz-afl -fPIC --prefix=/usr/local/x86_64-apple-darwin -DOPENSSL_NO_SECURE_MEMORY "darwin64-x86_64-cc" && make -j$(nproc) build_libs && make -j$(nproc) install_dev && rm -rf /usr/local/x86_64-apple-darwin/include/asm /usr/local/x86_64-apple-darwin/include/asm-generic && ls -l /usr/local/x86_64-apple-darwin && cd .. && rm -rf "openssl-${OPENSSL_VERSION}" && true # buildkit
RUN |2 ZLIB_VERSION=1.3.1 OPENSSL_VERSION=3.5.4 /bin/sh -c set -eux && tar xvzf "openssl-${OPENSSL_VERSION}.tar.gz" && cd "openssl-${OPENSSL_VERSION}" && echo "Building OpenSSL ${OPENSSL_VERSION} for aarch64 musl..." && mkdir -p /usr/local/aarch64-linux-musl/include && env CC=aarch64-linux-musl-gcc ./Configure no-asm no-engine no-shared no-zlib no-tests no-fuzz-libfuzzer no-fuzz-afl -fPIC --prefix=/usr/local/aarch64-linux-musl -DOPENSSL_NO_SECURE_MEMORY -mno-outline-atomics "linux-aarch64" && env C_INCLUDE_PATH=/usr/local/aarch64-linux-musl/include/ make depend && env C_INCLUDE_PATH=/usr/local/aarch64-linux-musl/include/ make -j$(nproc) && make -j$(nproc) install_sw && make -j$(nproc) install_ssldirs && rm -rf /usr/local/aarch64-linux-musl/include/asm /usr/local/aarch64-linux-musl/include/asm-generic && ls -l /usr/local/aarch64-linux-musl && cd .. && rm -rf "openssl-${OPENSSL_VERSION}" && true # buildkit
RUN |2 ZLIB_VERSION=1.3.1 OPENSSL_VERSION=3.5.4 /bin/sh -c set -eux && echo "Testing musl-gcc with OpenSSL..." && openssl version && echo "int main(){return 0;}" | musl-gcc -o test -x c - -I/usr/local/x86_64-linux-musl/include -L/usr/local/x86_64-linux-musl/lib -lssl -lcrypto && true # buildkit
RUN |2 ZLIB_VERSION=1.3.1 OPENSSL_VERSION=3.5.4 /bin/sh -c set -eux && echo "Removing temp files..." && rm -rf *~ taballs *.tar.xz && rm -rf /tmp/* && true # buildkit
ENV X86_64_UNKNOWN_LINUX_MUSL_OPENSSL_STATIC=1
ENV X86_64_UNKNOWN_LINUX_MUSL_OPENSSL_DIR=/usr/local/x86_64-linux-musl
ENV X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR=/usr/local/x86_64-linux-musl
ENV X86_64_APPLE_DARWIN_OPENSSL_DIR=/usr/local/x86_64-apple-darwin
ENV AARCH64_UNKNOWN_LINUX_MUSL_OPENSSL_STATIC=1
ENV AARCH64_UNKNOWN_LINUX_MUSL_OPENSSL_DIR=/usr/local/aarch64-linux-musl
ENV AARCH64_UNKNOWN_LINUX_GNU_OPENSSL_DIR=/usr/local/aarch64-linux-gnu
ENV AARCH64_APPLE_DARWIN_OPENSSL_DIR=/usr/local/aarch64-apple-darwin
WORKDIR /root/src

Labels

Key Value
description Docker image for cross-compiling Rust programs for Linux (musl libc) & macOS (osxcross).
maintainer Jose Quintana <joseluisq.net>
org.opencontainers.image.created 2026-04-09T04:37:37.557Z
org.opencontainers.image.description
org.opencontainers.image.documentation https://github.com/joseluisq/docker-osxcross
org.opencontainers.image.licenses
org.opencontainers.image.revision 52ab0f45aa4546f7a495c89144536c7dc7319deb
org.opencontainers.image.source https://git.richey.dev/miles/rust-linux-darwin-builder
org.opencontainers.image.title rust-linux-darwin-builder
org.opencontainers.image.url https://git.richey.dev/miles/rust-linux-darwin-builder
org.opencontainers.image.vendor Jose Quintana
org.opencontainers.image.version 2.0.0-beta.2-libs-amd64
version 2.0.0-beta.2-amd64
Details
Container
2026-04-08 23:45:22 -05:00
3
OCI / Docker
linux/amd64
2 GiB
Versions (14) View all
devel-libs-arm64 2026-04-09
devel-libs-amd64 2026-04-09
devel-arm64 2026-04-09