From f437ae9a51161099882274465b4135b1732212b9 Mon Sep 17 00:00:00 2001 From: tastytea Date: Sun, 3 May 2020 00:23:42 +0200 Subject: [PATCH] Base repoman on gentoo-base. --- repoman.Dockerfile | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/repoman.Dockerfile b/repoman.Dockerfile index 8ffb421..91e1ad7 100644 --- a/repoman.Dockerfile +++ b/repoman.Dockerfile @@ -1,17 +1,16 @@ # Portage tree. FROM gentoo/portage:latest as portage +# Minimal Gentoo image without build dependencies. +FROM tastytea/gentoo-base:latest as gentoo-base + # 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 \ - -pam -pcre -pcre-jit -perl -readline -rsync-verify -ssl -webdav" -ENV FEATURES "-ipc-sandbox -network-sandbox -pid-sandbox -sandbox -usersandbox" -ENV COMMON_FLAGS="-Os -pipe" -ENV CFLAGS="${COMMON_FLAGS}" -ENV CXXFLAGS="${COMMON_FLAGS}" -RUN eselect profile set default/linux/amd64/17.1/no-multilib +COPY --from=gentoo-base / /workdir +RUN cp /workdir/etc/portage/make.conf /etc/portage/make.conf +ENV USE "-curl -idn -net -ssl -webdav" +RUN eselect profile set default/linux/amd64/17.1 RUN emerge --root=/workdir --quiet app-portage/repoman dev-vcs/git RUN emerge --root=/workdir --rage-clean --quiet \ app-arch/tar \ @@ -20,21 +19,21 @@ RUN emerge --root=/workdir --rage-clean --quiet \ net-dns/libidn2 \ net-misc/rsync \ sys-apps/file \ - sys-apps/sed -RUN rm -r /workdir/usr/share/{doc,gtk-doc,i18n,locale,man,zoneinfo} + sys-apps/sed \ + dev-lang/perl \ + sys-libs/gdbm \ + sys-libs/timezone-data \ + app-misc/ca-certificates +RUN rm -r /workdir/usr/share/{doc,gtk-doc,man} RUN rm -r /workdir/usr/include +RUN rm -r /var/db/pkg # 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 +RUN eselect profile set default/linux/amd64/17.1 # TODO: Mount distfiles. # TODO: Use ccache with data on external volume.