FROM debian:bookworm-slim # add filesystem requirements ADD rootfs / # update package manager RUN apt-get update -y && \ apt-get upgrade -y && \ apt-get dist-upgrade -y && \ apt-get -y autoremove && \ apt-get clean # install preliminary packages RUN apt-get install -y \ coreutils \ bash \ curl \ ca-certificates \ build-essential \ distcc \ autoconf \ automake \ libtool # install squid dependencies RUN apt-get -y build-dep dante-server dante-client # add patches ADD patches/0002-osdep-m4-Remove-getaddrinfo-too-low-checks.patch /tmp/ # compile dante WORKDIR /tmp RUN mkdir -p /tmp/build && \ curl -o /tmp/build/dante.tar.gz "https://www.inet.no/dante/files/dante-1.4.3.tar.gz" && \ cd /tmp/build && \ tar --strip=1 -xf dante.tar.gz && \ cat /tmp/0002-osdep-m4-Remove-getaddrinfo-too-low-checks.patch | patch -p1 && \ autoreconf --force --install && \ export DISTCC_HOSTS="docker1.internal:35001 docker2.internal:35002 docker3.internal:35003" CC="distcc" CXX="distcc g++" && \ ./configure && \ make -j4 install && \ cp example/sockd.conf /etc/ && \ rm -rf /tmp/build # remove packages that will not be used WORKDIR / RUN apt-get purge -y \ curl \ git \ build-essential \ autoconf \ automake \ libtool \ distcc \ curl \ pkgconf && \ apt-get autoremove -y EXPOSE 1080 # add remaining files ADD rootfs / ENTRYPOINT [ "/bin/bash", "/usr/local/bin/run" ]