# syntax=docker/dockerfile:1 ARG ARCH=amd64 FROM $ARCH/alpine:latest RUN apk update RUN apk upgrade RUN apk add --no-cache \ bash-completion \ build-base \ wget \ curl \ vim \ tar \ ripgrep \ py3-pip \ less \ gcc \ g++ \ clang18 \ clang19 \ git \ ccache \ samurai \ cmake \ make \ bison \ flex \ ronn \ fuse \ fuse-dev \ fuse-static \ fuse3 \ fuse3-dev \ fuse3-static \ pkgconf \ binutils-dev \ libevent-dev \ libevent-static \ linux-headers \ date-dev \ range-v3-dev \ zlib-static \ libucontext-dev \ libdwarf-dev \ elfutils-dev \ utfcpp \ nlohmann-json \ meson \ autoconf \ strace \ gdb # Install UPX ARG ARCH RUN wget -O - https://github.com/upx/upx/releases/download/v5.0.0/upx-5.0.0-$(bash -c "echo \${0//v8/}" $ARCH)_linux.tar.xz | tar -xJf - -C /usr/local/bin --strip-components=1 --wildcards "*/upx" # Install mistletoe RUN pip3 install --break-system-packages --root-user-action ignore mistletoe # Install size-optimized and static-link-optimized libstdc++ RUN apk add --no-cache gmp-dev mpfr-dev mpc1-dev isl-dev COPY install-libstdcxx.sh /usr/local/bin/install-libstdcxx.sh RUN bash /usr/local/bin/install-libstdcxx.sh # Install mold COPY install-mold.sh /usr/local/bin/install-mold.sh RUN bash /usr/local/bin/install-mold.sh # Install bloaty COPY install-bloaty.sh /usr/local/bin/install-bloaty.sh RUN bash /usr/local/bin/install-bloaty.sh # Install all static libraries COPY install-static-libs.sh /usr/local/bin/install-static-libs.sh RUN bash /usr/local/bin/install-static-libs.sh gcc clang-19 :alpine # Install the *real* ninja... # TODO: move this up if we change anything RUN apk add --no-cache ninja-build # Set up git & user RUN git config --global --add safe.directory /workspace RUN adduser -G users -s bash -u 1000 -D mhx USER mhx ENTRYPOINT /workspace/.docker/build-linux.sh