ARG FROMBASEOS ARG FROMBASEOS_BUILD_TAG=latest FROM electriccoinco/zcashd-build:$FROMBASEOS$FROMBASEOS_BUILD_TAG ARG DUMBINIT_VERSION=1.2.2 RUN wget -O /usr/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v${DUMBINIT_VERSION}/dumb-init_${DUMBINIT_VERSION}_amd64 RUN chmod +x /usr/bin/dumb-init # 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 ADD bbworker-requirements.txt requirements.txt RUN python -m venv venv \ && . venv/bin/activate \ && python -m pip install wheel \ && python -m pip install -r requirements.txt # Buildbot worker ARG BASEOS ENV BUILDBOT_WORKER_NAME=$BASEOS-docker ENV BUILDBOT_WORKER_PASS=thisgetssetwhenpodisstarted ENV BUILDBOT_MASTER_HOST=dev-ci.z.cash ENV 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: $BASEOS" > $BUILDBOT_WORKER_NAME/info/host ADD bbworker-buildbot.tac $BUILDBOT_WORKER_NAME/buildbot.tac WORKDIR /home/$BUILDBOT_USER/$BUILDBOT_WORKER_NAME CMD ["/usr/bin/dumb-init", "../venv/bin/twistd", "--pidfile=", "-ny", "buildbot.tac"]