FROM archlinux:latest RUN pacman --noconfirm -Syu && pacman --noconfirm -Sy wget sudo arch-install-scripts git cmake make mbedtls ncurses rsync bison flex git gperf help2man lzip python unzip base-devel nodejs npm RUN git clone https://github.com/crosstool-ng/crosstool-ng && cd ./crosstool-ng && ./bootstrap && ./configure && make install RUN mkdir nfpm && cd nfpm && wget "https://github.com/goreleaser/nfpm/releases/download/v2.46.3/nfpm_2.46.3_Linux_x86_64.tar.gz" && tar xf nfpm_2.46.3_Linux_x86_64.tar.gz && mv nfpm /usr/local/bin/ && cd .. && rm -rf nfpm RUN useradd -m build && \ echo "build ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/build COPY config /tmp/config USER build WORKDIR /home/build/ct RUN cp /tmp/config .config && ct-ng build.`nproc` && rm -rf * USER root WORKDIR /root COPY --chmod=755 cmake-cross /usr/local/bin/cmake-cross