# STAGE 1: Initial Setup from gentoo/stage3 FROM gentoo/stage3 AS setup RUN cat <<-EOF >>/etc/portage/make.conf ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="*" EMERGE_DEFAULT_OPTS="--autounmask=y --autounmask-continue=y --getbinpkg --usepkg --jobs=2" MAKEOPTS="-j$(nproc)" FEATURES="getbinpkg -pid-sandbox -ipc-sandbox -network-sandbox" EOF RUN mkdir -p /etc/portage/binrepos.conf/ && \ cat <<-EOF >/etc/portage/binrepos.conf/gentoobinhost.conf [binhost] priority = 9999 sync-uri = https://distfiles.gentoo.org/releases/amd64/binpackages/23.0/x86-64/ EOF # Match binhost USE flags RUN cat <<-EOF >>/etc/portage/package.use/use media-libs/mesa vulkan wayland sys-devel/gcc lto pgo x11-libs/libxkbcommon X wayland EOF RUN emaint sync -a >/dev/null && \ emerge --update --oneshot -v app-portage/getuto && \ getuto # STAGE 2: Emerge @world FROM setup AS world RUN emerge --update --deep --newuse -v @world # STAGE 3: Emerge LLVM FROM world AS llvm RUN emerge --update -v llvm-core/llvm # STAGE 4: Emerge Clang FROM llvm AS clang RUN emerge --update -v llvm-core/clang # STAGE 5: Final image FROM clang AS final RUN emerge --onlydeps -v www-client/google-chrome-unstable