[MIRROR] Common effort to get an official and automated gentoo base docker container
See the codeA collection of Dockerfiles for generating Gentoo docker images.
These images are intended to be created automatically by
a cron job and pushed to docker hub.
This repository include basic stage3 images and an image usable as a /var/db/repos/gentoo volume
https://hub.docker.com/u/gentoo/
The following targets are built and pushed to Docker Hub:
portagestage3
amd64
stage3-amd64-hardened-openrcstage3-amd64-llvm-openrcstage3-amd64-llvm-systemdstage3-amd64-musl-openrcstage3-amd64-musl-hardened-openrcstage3-amd64-musl-llvm-openrcstage3-amd64-nomultilib-openrcstage3-amd64-nomultilib-systemdstage3-amd64-openrcstage3-amd64-desktop-openrcstage3-amd64-systemdstage3-amd64-desktop-systemdarm
stage3-armv5tel-openrcstage3-armv5tel-systemdstage3-armv6j-openrcstage3-armv6j-systemdstage3-armv6j_hardfp-openrcstage3-armv6j_hardfp-systemdstage3-armv7a-openrcstage3-armv7a-systemdstage3-armv7a_hardfp_musl-openrcstage3-armv7a_hardfp-openrcstage3-armv7a_hardfp-systemdarm64
stage3-arm64-desktop-openrcstage3-arm64-desktop-systemdstage3-arm64-llvm-openrcstage3-arm64-llvm-systemdstage3-arm64-musl-openrcstage3-arm64-musl-hardened-openrcstage3-arm64-musl-llvm-openrcstage3-arm64-openrcstage3-arm64-systemdppc
stage3-ppc64le-musl-hardened-openrcstage3-ppc64le-openrcstage3-ppc64le-systemdriscv
stage3-rv64_lp64-openrcstage3-rv64_lp64-systemdstage3-rv64_lp64d-openrcstage3-rv64_lp64d-systemds390
stage3-s390xx86
stage3-i686-hardened-openrcstage3-i686-musl-openrcstage3-i686-openrcstage3-i686-ssemath-t64-openrcstage3-i686-ssemath-t64-systemdstage3-i686-systemdThe following upstream stage3 targets are not built at all:
amd64
stage3-amd64 [deprecated]stage3-amd64-hardened [deprecated]stage3-amd64-hardened+nomultilib [deprecated]stage3-amd64-hardened-selinux [deprecated, selinux]stage3-amd64-hardened-selinux+nomultilib [deprecated, selinux]stage3-amd64-hardened-selinux-openrc [selinux]stage3-amd64-musl [deprecated]stage3-amd64-musl-hardened [deprecated]stage3-amd64-musl-llvm [deprecated]stage3-amd64-musl-vanilla [deprecated]stage3-amd64-nomultilib [deprecated]stage3-amd64-nomultilib-selinux-openrc [selinux]stage3-arm64-musl [deprecated]stage3-arm64-musl-hardened [deprecated]stage3-arm64-musl-llvm [deprecated]stage3-x32 [deprecated, unsupported]stage3-x32-openrc [unsupported]arm
stage3-armv4tl [unsupported]stage3-armv4tl-systemd [unsupported]ppc
stage3-power9le-openrc [unsupported]stage3-power9le-systemd [unsupported]stage3-ppc [deprecated, unsupported]stage3-ppc-openrc [unsupported]stage3-ppc64 [deprecated, unsupported]stage3-ppc64-musl-hardened [deprecated, unsupported]stage3-ppc64-musl-hardened-openrc [unsupported]stage3-ppc64-openrc [unsupported]stage3-ppc64-systemd [unsupported]stage3-ppc64le [deprecated]stage3-ppc64le-musl-hardened [deprecated]riscv
stage3-rv32_* [unsupported]stage3-rv64_multilib [under testing]s390
stage3-s390 [unsupported]x86
stage3-i486 [deprecated, unsupported]stage3-i486-openrc [unsupported]stage3-i686 [deprecated]stage3-i686-hardened [deprecated]stage3-i686-musl [deprecated]stage3-i686-musl-vanilla [deprecated][deprecated]: Deprecated stage3 target
[selinux]: SELinux doesn't seem to make sense inside containers
[under testing]: Not ready for container. Our arch team is working on testing it
[unsupported]: Unsupported Docker architecture
The 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-openrc ./build.sh
docker create -v /var/db/repos/gentoo --name myportagesnapshot gentoo/portage:latest /bin/true
docker run --interactive --tty --volumes-from myportagesnapshot gentoo/stage3: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
# based on stage3 image
FROM gentoo/stage3: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:
Dockerfile
52.2%
Shell
47.8%
[MIRROR] Common effort to get an official and automated gentoo base docker container
See the codeA collection of Dockerfiles for generating Gentoo docker images.
These images are intended to be created automatically by
a cron job and pushed to docker hub.
This repository include basic stage3 images and an image usable as a /var/db/repos/gentoo volume
https://hub.docker.com/u/gentoo/
The following targets are built and pushed to Docker Hub:
portagestage3
amd64
stage3-amd64-hardened-openrcstage3-amd64-llvm-openrcstage3-amd64-llvm-systemdstage3-amd64-musl-openrcstage3-amd64-musl-hardened-openrcstage3-amd64-musl-llvm-openrcstage3-amd64-nomultilib-openrcstage3-amd64-nomultilib-systemdstage3-amd64-openrcstage3-amd64-desktop-openrcstage3-amd64-systemdstage3-amd64-desktop-systemdarm
stage3-armv5tel-openrcstage3-armv5tel-systemdstage3-armv6j-openrcstage3-armv6j-systemdstage3-armv6j_hardfp-openrcstage3-armv6j_hardfp-systemdstage3-armv7a-openrcstage3-armv7a-systemdstage3-armv7a_hardfp_musl-openrcstage3-armv7a_hardfp-openrcstage3-armv7a_hardfp-systemdarm64
stage3-arm64-desktop-openrcstage3-arm64-desktop-systemdstage3-arm64-llvm-openrcstage3-arm64-llvm-systemdstage3-arm64-musl-openrcstage3-arm64-musl-hardened-openrcstage3-arm64-musl-llvm-openrcstage3-arm64-openrcstage3-arm64-systemdppc
stage3-ppc64le-musl-hardened-openrcstage3-ppc64le-openrcstage3-ppc64le-systemdriscv
stage3-rv64_lp64-openrcstage3-rv64_lp64-systemdstage3-rv64_lp64d-openrcstage3-rv64_lp64d-systemds390
stage3-s390xx86
stage3-i686-hardened-openrcstage3-i686-musl-openrcstage3-i686-openrcstage3-i686-ssemath-t64-openrcstage3-i686-ssemath-t64-systemdstage3-i686-systemdThe following upstream stage3 targets are not built at all:
amd64
stage3-amd64 [deprecated]stage3-amd64-hardened [deprecated]stage3-amd64-hardened+nomultilib [deprecated]stage3-amd64-hardened-selinux [deprecated, selinux]stage3-amd64-hardened-selinux+nomultilib [deprecated, selinux]stage3-amd64-hardened-selinux-openrc [selinux]stage3-amd64-musl [deprecated]stage3-amd64-musl-hardened [deprecated]stage3-amd64-musl-llvm [deprecated]stage3-amd64-musl-vanilla [deprecated]stage3-amd64-nomultilib [deprecated]stage3-amd64-nomultilib-selinux-openrc [selinux]stage3-arm64-musl [deprecated]stage3-arm64-musl-hardened [deprecated]stage3-arm64-musl-llvm [deprecated]stage3-x32 [deprecated, unsupported]stage3-x32-openrc [unsupported]arm
stage3-armv4tl [unsupported]stage3-armv4tl-systemd [unsupported]ppc
stage3-power9le-openrc [unsupported]stage3-power9le-systemd [unsupported]stage3-ppc [deprecated, unsupported]stage3-ppc-openrc [unsupported]stage3-ppc64 [deprecated, unsupported]stage3-ppc64-musl-hardened [deprecated, unsupported]stage3-ppc64-musl-hardened-openrc [unsupported]stage3-ppc64-openrc [unsupported]stage3-ppc64-systemd [unsupported]stage3-ppc64le [deprecated]stage3-ppc64le-musl-hardened [deprecated]riscv
stage3-rv32_* [unsupported]stage3-rv64_multilib [under testing]s390
stage3-s390 [unsupported]x86
stage3-i486 [deprecated, unsupported]stage3-i486-openrc [unsupported]stage3-i686 [deprecated]stage3-i686-hardened [deprecated]stage3-i686-musl [deprecated]stage3-i686-musl-vanilla [deprecated][deprecated]: Deprecated stage3 target
[selinux]: SELinux doesn't seem to make sense inside containers
[under testing]: Not ready for container. Our arch team is working on testing it
[unsupported]: Unsupported Docker architecture
The 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-openrc ./build.sh
docker create -v /var/db/repos/gentoo --name myportagesnapshot gentoo/portage:latest /bin/true
docker run --interactive --tty --volumes-from myportagesnapshot gentoo/stage3: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
# based on stage3 image
FROM gentoo/stage3: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:
Dockerfile
52.2%
Shell
47.8%