2020-04-20 00:55:02 +02:00
|
|
|
# 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"
|
2020-04-20 03:07:57 +02:00
|
|
|
ENV USE "minimal -cracklib -curl -gpg -idn -ncurses -net -nls \
|
|
|
|
-pam -pcre -pcre-jit -perl -readline -rsync-verify -ssl -webdav"
|
2020-04-20 00:55:02 +02:00
|
|
|
ENV FEATURES "-ipc-sandbox -network-sandbox -pid-sandbox -sandbox -usersandbox"
|
2020-05-01 15:05:35 +02:00
|
|
|
ENV COMMON_FLAGS="-Os -pipe"
|
|
|
|
ENV CFLAGS="${COMMON_FLAGS}"
|
|
|
|
ENV CXXFLAGS="${COMMON_FLAGS}"
|
2020-04-20 00:55:02 +02:00
|
|
|
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
|
2020-04-20 03:07:57 +02:00
|
|
|
RUN rm -r /workdir/usr/share/{doc,gtk-doc,i18n,locale,man,zoneinfo}
|
|
|
|
RUN rm -r /workdir/usr/include
|
2020-04-20 00:55:02 +02:00
|
|
|
|
|
|
|
# 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.
|