A collection of Dockerfiles for generating Gentoo docker images.
These images are intended to be created automatically by
a travis cron job and pushed to docker hub.
This repository include basic stage3 images and an image usable as a /usr/portage volume
https://hub.docker.com/u/gentoo/
The following targets are built by Travis and pushed to Docker Hub:
portagestage3
amd64
stage3-amd64stage3-amd64-hardenedstage3-amd64-hardened-nomultilibstage3-amd64-musl-hardenedstage3-amd64-musl-vanillastage3-amd64-nomultilibstage3-amd64-systemdstage3-amd64-uclibc-hardenedstage3-amd64-uclibc-vanillaarm64
stage3-arm64stage3-arm64-systemdarm
stage3-armv5telstage3-armv6j_hardfpstage3-armv7a_hardfpppc
stage3-ppc64les390
stage3-s390xx86
stage3-x86stage3-x86-hardenedstage3-x86-musl-vanillastage3-x86-systemdstage3-x86-uclibc-hardenedstage3-x86-uclibc-vanillaThe following upstream stage3 targets are not built at all (see rationale):
amd64
stage3-amd64-hardened-selinuxstage3-amd64-hardened-selinux+nomultilibstage3-x32arm
stage3-armv4tlstage3-armv6jstage3-armv7appc
stage3-ppcstage3-ppc64s390
stage3-s390x86
stage3-i486The containers are created using a multi-stage build, which requires Docker >= 19.03.0. The container being built is defined by the TARGET environment variable:
TARGET=stage3-amd64 ./build.sh
docker create -v /usr/portage --name myportagesnapshot gentoo/portage:latest /bin/true
docker run --interactive --tty --volumes-from myportagesnapshot gentoo/stage3-amd64:latest /bin/bash
docker-17.05.0 or later supports multi-stage builds, allowing the portage volume to be used when creating images based on a stage3 image.
Example Dockerfile
# name the portage image
FROM gentoo/portage:latest as portage
# image is based on stage3-amd64
FROM gentoo/stage3-amd64:latest
# copy the entire portage volume in
COPY --from=portage /var/db/repos/gentoo /var/db/repos/gentoo
# continue with image build ...
RUN emerge -qv www-servers/apache # or whichever packages you need
We'd love to hear any ideas. Feel free to contact us via any of the following methods:
Content type
Image
Digest
Size
267.4 MB
Last updated
over 5 years ago
docker pull andzuc/gentoo-stage3-amd64:2021011603