32 lines
1.3 KiB
Docker
32 lines
1.3 KiB
Docker
# 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
|
|
RUN sed -i 's/-O2/-Os/' /etc/portage/make.conf
|
|
RUN echo -e '\n# Added by tastytea/gentoo-base:' >> /etc/portage/make.conf
|
|
# Bug 680456.
|
|
RUN echo 'FEATURES="-ipc-sandbox -mount-sandbox -network-sandbox -pid-sandbox \
|
|
-sandbox -usersandbox"' >> /etc/portage/make.conf
|
|
RUN echo 'MAKEOPTS="-j1"' >> /etc/portage/make.conf
|
|
RUN echo 'USE="minimal -cracklib -gpg -ncurses -nls -pam -pcre -pcre-jit -perl \
|
|
-readline -rsync-verify"' >> /etc/portage/make.conf
|
|
RUN eselect profile set default/linux/amd64/17.1
|
|
RUN quickpkg --include-config=y @system sys-libs/glibc \
|
|
app-portage/elt-patches dev-lang/perl
|
|
RUN emerge --root=/workdir --usepkgonly --nodeps --quiet \
|
|
app-portage/elt-patches dev-lang/perl
|
|
RUN emerge --root=/workdir --root-deps --usepkg --quiet sys-apps/portage
|
|
RUN cp /etc/portage/make.conf /workdir/etc/portage/make.conf
|
|
RUN rm -r /workdir/usr/share/{doc,i18n,locale,man,zoneinfo}
|
|
|
|
# Final image.
|
|
FROM scratch
|
|
LABEL maintainer="tastytea+docker@tastytea.de"
|
|
LABEL description="[WIP] My base for Gentoo images."
|
|
COPY --from=build /workdir /
|
|
|
|
# TODO: Mount distfiles.
|
|
# TODO: Use ccache with data on external volume.
|