# This docker file is use for the log parser and ebuild parser image # Use stable arch and gentoo's experimental binhost # 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 # Setup portage and emerge needed deps buildbot-worker, psycopg, git and sqlalchemy RUN echo -e "[binhost]\npriority = 9999\nsync-uri = https://gentoo.osuosl.org/experimental/amd64/binpkg/default/linux/17.1/x86-64/\n" | cat >> /etc/portage/binrepos.conf\ && echo 'EMERGE_DEFAULT_OPTS="--binpkg-respect-use=n --usepkg=y --getbinpkg=y --autounmask-write --autounmask-continue --autounmask-keep-keywords=y --autounmask-use=y"' | cat >> /etc/portage/make.conf\ && echo 'FEATURES="-ipc-sandbox -pid-sandbox -network-sandbox -usersandbox -mount-sandbox sandbox"' | cat >> /etc/portage/make.conf\ && echo 'FEATURES="${FEATURES} parallel-install parallel-fetch -merge-sync"' | cat >> /etc/portage/make.conf\ && echo 'FEATURES="${FEATURES} buildpkg"' | cat >> /etc/portage/make.conf\ && echo 'MAKEOPTS="-j8"' | cat >> /etc/portage/make.conf\ && echo 'dev-libs/glib' | cat >> /etc/portage/package.mask/git\ && emerge -qv buildbot-worker sqlalchemy dev-python/psycopg:2 rust-bin dev-vcs/git utils-xz # We don't need the gentoo repo any longer RUN rm -R /var/db/repos/gentoo # run on buildbot user RUN chown buildbot:buildbot /var/lib/buildbot_worker USER buildbot WORKDIR /var/lib/buildbot_worker # Get the needed buildbot-worker config # Change umask so portage can read the ebuilds in the repos RUN wget https://raw.githubusercontent.com/buildbot/buildbot/master/worker/docker/buildbot.tac\ && ( sed -i -e 's/umask = None/umask = 0o22/g' buildbot.tac 2>/dev/null || true ) ENTRYPOINT ["/usr/bin/buildbot-worker"] CMD ["start", "--nodaemon"]