FROM gentoo/stage3-amd64:20190829 VOLUME /var/cache/binpkgs RUN emerge --sync && \ emerge -1 portage #Pre-build configuration could be here #RUN touch /etc/init.d/functions.sh && \ # echo 'PYTHON_TARGETS="${PYTHON_TARGETS} python3_6"' >> /etc/portage/make.conf && \ # echo 'PYTHON_SINGLE_TARGET="python3_6"' >> /etc/portage/make.conf # Install mandatory packages RUN emerge -1 -U =gcc-8.3.0* distcc dev-vcs/git dev-vcs/bzr app-portage/layman app-portage/gentoolkit app-portage/eix app-misc/mc dev-libs/libxml2 net-ftp/lftp # Adapt configuration RUN \ mkdir /darklin && \ cd /darklin && \ git clone http://darksoft.org/git/csa/devops/darkconf/gentoo.git && \ git clone http://darksoft.org/git/csa/devops/darkconf/darklin4.git && \ \ # Configuring paths rm -rf /etc/portage && rm -f /etc/make.conf && \ ln -s /darklin/gentoo /etc/portage && \ ln -s /etc/portage/extraconf/remote.conf /etc/make.conf && \ mkdir -p /Image/My/DarkLin/ && \ ln -s /darklin/darklin4 /Image/My/DarkLin/portage && \ ln -s /var/db/repos/gentoo /usr/portage && \ ln -s /var/cache/distfiles /usr/portage/distfiles && \ \ # Fixing layman and local portage rm -f /var/lib/layman/installed.xml && \ mkdir -p /usr/local/portage/profiles && \ mkdir -p /usr/local/portage/metadata && \ echo "masters = gentoo" > /usr/local/portage/metadata/layout.conf && \ echo "local" > /usr/local/portage/profiles/repo_name && \ bash /etc/portage/scripts/bootstrap/layman_reinit.sh && \ \ # Skip binary packages rm -f /etc/portage/sets/desktop-apps-bin && \ # Adjusting for legacy packets rm -f /etc/portage/sets/legacy && \ rm -f /etc/portage/package.keywords/skip.keywords && \ rm -f /etc/portage/package.keywords/xdeps-perl* && \ rm -f /etc/portage/package.keywords/xdeps-firefox* && \ bash /etc/portage/scripts/gen-world-sets CMD ["bash"]