summaryrefslogtreecommitdiffstats
path: root/bootstrap
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2019-09-02 21:21:29 +0200
committerSuren A. Chilingaryan <csa@suren.me>2019-09-02 21:21:29 +0200
commit9ee658cba222c4141d90f868a45ac3718d655852 (patch)
treeeed31c493fe9bc9a69d4895bd72d5a5aa8956c71 /bootstrap
downloadgentoo-builder-9ee658cba222c4141d90f868a45ac3718d655852.tar.gz
gentoo-builder-9ee658cba222c4141d90f868a45ac3718d655852.tar.bz2
gentoo-builder-9ee658cba222c4141d90f868a45ac3718d655852.tar.xz
gentoo-builder-9ee658cba222c4141d90f868a45ac3718d655852.zip
Proof of concept
Diffstat (limited to 'bootstrap')
-rw-r--r--bootstrap/Dockerfile49
1 files changed, 49 insertions, 0 deletions
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"]