buildmaster: fix Twisted dependency hell by using twisted==22.10.0
[buildbot.git] / docker / buildmaster / Dockerfile
1 FROM debian:11
2 MAINTAINER OpenWrt Maintainers
3
4 ARG DEBIAN_FRONTEND=noninteractive
5 ARG BUILDBOT_VERSION=2.10.1
6 ARG OPENWRT_VERSION=unknown
7
8 ENV BUILDMASTER_CONFIG config.ini
9 ENV BUILDMASTER_PHASE 1
10
11 USER root
12
13 RUN \
14 apt-get update && \
15 apt-get install -y \
16 build-essential \
17 gawk \
18 git-core \
19 gosu \
20 libncurses5-dev \
21 locales \
22 pv \
23 pwgen \
24 python3-pip \
25 signify-openbsd \
26 wget && \
27 apt-get clean && \
28 localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
29
30 RUN pip3 install -U pip
31 RUN \
32 pip3 install \
33 "buildbot==$BUILDBOT_VERSION" \
34 "buildbot-www==$BUILDBOT_VERSION" \
35 "buildbot-waterfall-view==$BUILDBOT_VERSION" \
36 "buildbot-console-view==$BUILDBOT_VERSION" \
37 "buildbot-grid-view==$BUILDBOT_VERSION" \
38 "buildbot-worker==$BUILDBOT_VERSION" \
39 "twisted==22.10.0" \
40 pyOpenSSL \
41 service_identity
42 RUN \
43 sed -i \
44 's/Welcome to buildbot/Welcome to OpenWrt buildbot/' \
45 /usr/local/lib/python*/dist-packages/buildbot_www/static/scripts.js
46
47 RUN \
48 sed -i \
49 "s;\"col-sm-12\"><ul><li ng-repeat;\"col-sm-12\"><ul><li>OpenWrt version: <a href=\"https://git.openwrt.org/$OPENWRT_VERSION\">$OPENWRT_VERSION</a></li><li ng-repeat;" \
50 /usr/local/lib/python*/dist-packages/buildbot_www/static/scripts.js
51
52 ENV LANG=en_US.utf8
53
54 COPY docker/buildmaster/files/entry.sh /entry.sh
55 COPY docker/buildmaster/files/start.sh /start.sh
56 COPY phase1 /phase1
57 COPY phase2 /phase2
58 COPY scripts /scripts
59
60 RUN \
61 groupadd buildbot && \
62 useradd \
63 --create-home --home-dir /master \
64 --comment "OpenWrt buildbot" \
65 --gid buildbot --shell /bin/bash buildbot && \
66 chown buildbot:buildbot /master && \
67 chmod 0755 /entry.sh /start.sh
68
69 VOLUME [ "/master" ]
70 ENTRYPOINT [ "/entry.sh" ]
71 CMD [ "start" ]