FROM fedora:32 RUN dnf -y install \ make \ git \ gcc \ gcc-c++ \ zip \ sudo \ rpm-build \ which \ mingw64-gcc \ clang \ patch \ cmake \ libxml2-devel \ openssl-devel ENV N_V 12.16.1 RUN cd /usr/local && \ curl -o - -L https://nodejs.org/dist/v${N_V}/node-v${N_V}-linux-x64.tar.gz | \ tar zxf - --strip-components=1 ARG REAL_UID=1000 ARG REAL_GID=1000 RUN groupadd --non-unique --gid ${REAL_GID} builder RUN useradd --non-unique --uid ${REAL_UID} --gid ${REAL_GID} --password "" --groups wheel builder RUN echo "builder ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/builder ENV OSXCROSS_SDK_VERSION "10.11" WORKDIR /opt RUN git clone https://github.com/tpoechtrager/osxcross.git WORKDIR /opt/osxcross RUN curl -L -o \ ./tarballs/MacOSX${OSXCROSS_SDK_VERSION}.sdk.tar.xz \ https://s3.amazonaws.com/andrew-osx-sdks/MacOSX${OSXCROSS_SDK_VERSION}.sdk.tar.xz RUN sed -i -e 's|-march=native||g' ./build_clang.sh ./wrapper/build_wrapper.sh RUN printf "\n" | OSX_VERSION_MIN="10.9" PORTABLE=true bash -x ./build.sh USER builder ENV PATH=/home/builder/.cargo/bin:/root/.cargo/bin:$PATH RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y RUN rustup target add x86_64-apple-darwin COPY /docker/builder/docker-entrypoint.sh / ENTRYPOINT ["/docker-entrypoint.sh"]