commit 59e1759134978bb40acbb219611ba44f9de2440f Author: tastytea Date: Mon Apr 20 00:55:02 2020 +0200 Add repoman. diff --git a/repoman.Dockerfile b/repoman.Dockerfile new file mode 100644 index 0000000..c3eb0cd --- /dev/null +++ b/repoman.Dockerfile @@ -0,0 +1,35 @@ +# Portage tree. +FROM gentoo/portage:latest as portage + +# Build packages in /workdir. +FROM gentoo/stage3-amd64:latest as build +COPY --from=portage /var/db/repos/gentoo /var/db/repos/gentoo +ENV MAKEOPTS "-j1" +ENV USE "minimal -cracklib -curl -gpg -idn -ncurses -net -nls" +ENV USE "${USE} -pam -pcre -perl -readline -rsync-verify -ssl -webdav" +ENV FEATURES "-ipc-sandbox -network-sandbox -pid-sandbox -sandbox -usersandbox" +RUN eselect profile set default/linux/amd64/17.1/no-multilib +RUN emerge --root=/workdir --quiet app-portage/repoman dev-vcs/git +RUN emerge --root=/workdir --rage-clean --quiet \ + app-arch/tar \ + app-arch/xz-utils \ + dev-libs/openssl \ + net-dns/libidn2 \ + net-misc/rsync \ + sys-apps/file \ + sys-apps/sed + +# Final image. +FROM gentoo/portage:latest +LABEL maintainer="tastytea+docker@tastytea.de" +LABEL description="Latest stable app-portage/repoman." +COPY --from=build /workdir / +RUN eselect profile set default/linux/amd64/17.1/no-multilib +# Bug 680456. +RUN echo 'FEATURES="-ipc-sandbox -network-sandbox"' >> /etc/portage/make.conf +# repoman needs portage user and group. +RUN echo 'portage:x:250:250:portage:/var/tmp/portage:/bin/false' >> /etc/passwd +RUN echo 'portage::250:portage' >> /etc/group + +# TODO: Mount distfiles. +# TODO: Use ccache with data on external volume.