2020-10-15 09:19:28 -07:00
|
|
|
FROM electriccoinco/zcashd-build-arch
|
2020-05-01 09:56:17 -07:00
|
|
|
|
|
|
|
# Buildbot user
|
|
|
|
ARG BUILDBOT_USER=zcbbworker
|
|
|
|
ARG BUILDBOT_UID=2001
|
|
|
|
RUN useradd --home-dir /home/$BUILDBOT_USER \
|
|
|
|
--shell /bin/bash \
|
|
|
|
--create-home \
|
|
|
|
--uid $BUILDBOT_UID\
|
|
|
|
$BUILDBOT_USER
|
|
|
|
|
|
|
|
USER $BUILDBOT_USER
|
|
|
|
WORKDIR /home/$BUILDBOT_USER
|
|
|
|
|
2020-10-15 14:24:21 -07:00
|
|
|
ADD bbworker-requirements.txt requirements.txt
|
2020-05-01 09:56:17 -07:00
|
|
|
RUN python -m venv venv \
|
|
|
|
&& . venv/bin/activate \
|
2020-10-15 14:24:21 -07:00
|
|
|
&& python -m pip install wheel \
|
|
|
|
&& python -m pip install -r requirements.txt
|
2020-05-01 09:56:17 -07:00
|
|
|
|
|
|
|
# Buildbot worker
|
|
|
|
ARG BUILDBOT_WORKER_NAME=arch-docker
|
|
|
|
ARG BUILDBOT_WORKER_PASS=thisgetssetwhenpodisstarted
|
|
|
|
ARG BUILDBOT_MASTER_HOST=dev-ci.z.cash
|
|
|
|
ARG BUILDBOT_MASTER_PORT=9899
|
|
|
|
|
|
|
|
WORKDIR /home/$BUILDBOT_USER
|
|
|
|
RUN venv/bin/buildbot-worker create-worker $BUILDBOT_WORKER_NAME \
|
|
|
|
$BUILDBOT_MASTER_HOST:$BUILDBOT_MASTER_PORT \
|
|
|
|
$BUILDBOT_WORKER_NAME $BUILDBOT_WORKER_PASS \
|
|
|
|
&& echo "OS: Centos 8" > $BUILDBOT_WORKER_NAME/info/host
|
2020-10-15 09:19:28 -07:00
|
|
|
ADD bbworker-buildbot.tac $BUILDBOT_WORKER_NAME/buildbot.tac
|
2020-05-01 09:56:17 -07:00
|
|
|
|
|
|
|
WORKDIR /home/$BUILDBOT_USER/$BUILDBOT_WORKER_NAME
|
|
|
|
CMD ["/usr/bin/dumb-init", "../venv/bin/twistd", "--pidfile=", "-ny", "buildbot.tac"]
|