2017-10-24 21:27:52 +02:00
|
|
|
# vi:syntax=dockerfile
|
2017-10-25 16:25:12 +02:00
|
|
|
FROM registry.fedoraproject.org/fedora:27
|
2017-10-24 21:27:52 +02:00
|
|
|
MAINTAINER Daniele Viganò <daniele@vigano.me>
|
|
|
|
|
2018-02-26 21:03:55 +01:00
|
|
|
RUN dnf install -y sudo findutils tar bzip2 git python3-pip mock copr-cli && \
|
|
|
|
dnf clean all && \
|
|
|
|
find /var/cache/dnf -type d -delete
|
2017-10-24 21:27:52 +02:00
|
|
|
# Use a Twisted binary wheel to avoid too many dependencies
|
2018-02-26 18:26:11 +01:00
|
|
|
RUN pip3 install https://daniele.vigano.me/files/pypi/Twisted-17.9.0-cp36-cp36m-manylinux1_x86_64.whl \
|
2017-10-24 21:27:52 +02:00
|
|
|
buildbot-worker
|
|
|
|
|
2017-10-25 16:25:12 +02:00
|
|
|
RUN useradd -u 1000 builder && \
|
2017-10-24 21:27:52 +02:00
|
|
|
usermod -a -G mock builder
|
|
|
|
|
2017-10-25 09:36:11 +02:00
|
|
|
RUN echo "builder ALL=(ALL) NOPASSWD: /usr/bin/dnf" >> /etc/sudoers
|
|
|
|
|
2017-10-24 21:27:52 +02:00
|
|
|
USER builder
|
|
|
|
ENV HOME /home/builder
|
|
|
|
WORKDIR ${HOME}
|
|
|
|
|
2017-10-25 16:25:12 +02:00
|
|
|
RUN buildbot-worker create-worker $HOME 172.17.0.1 f27 work3rP@ss! && \
|
2017-10-24 21:27:52 +02:00
|
|
|
echo "Daniele Viganò <daniel@vigano.me>" > info/admin && \
|
2017-10-25 16:25:12 +02:00
|
|
|
echo "Docker running Fedora 27 (x86_64)" > info/host
|
2017-10-24 21:27:52 +02:00
|
|
|
|
2017-10-26 13:35:37 +02:00
|
|
|
COPY copr $HOME/.config/copr
|
2017-10-25 16:25:12 +02:00
|
|
|
ENTRYPOINT ["/usr/local/bin/buildbot-worker"]
|
2017-10-24 21:27:52 +02:00
|
|
|
CMD ["start", "--nodaemon"]
|