41 lines
1.2 KiB
Docker
41 lines
1.2 KiB
Docker
# 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
|
|
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 --buildpkg=y --usepkg --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 \
|
|
dev-lang/perl \
|
|
sys-libs/gdbm \
|
|
sys-libs/timezone-data \
|
|
app-misc/ca-certificates
|
|
RUN rm -r /workdir/usr/share/gtk-doc
|
|
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
|
|
|
|
# TODO: Mount distfiles.
|
|
# TODO: Use ccache with data on external volume.
|