From 9ee658cba222c4141d90f868a45ac3718d655852 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Mon, 2 Sep 2019 21:21:29 +0200 Subject: Proof of concept --- bootstrap/Dockerfile | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 bootstrap/Dockerfile (limited to 'bootstrap') diff --git a/bootstrap/Dockerfile b/bootstrap/Dockerfile new file mode 100644 index 0000000..08d0447 --- /dev/null +++ b/bootstrap/Dockerfile @@ -0,0 +1,49 @@ +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 && \ + eix-sync + +# 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 && \ + \ + # 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 && \ + bash /etc/portage/scripts/bootstrap/fix_deps.sh + +CMD ["bash"] -- cgit v1.2.3