Files
global-containers/Dockerfile.linux
2026-06-18 01:43:07 -05:00

24 lines
856 B
Docker

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.2 && rm -rf *
USER root
WORKDIR /root
COPY --chmod=755 cmake-cross /usr/local/bin/cmake-cross