f4b3afb52b423c20be43e119667a2f3e81c8e19f
[buildbot.git] / docker / buildmaster / Dockerfile
1 FROM debian:10
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 pyOpenSSL \
40 service_identity
41 RUN \
42 sed -i \
43 's/Welcome to buildbot/Welcome to OpenWrt buildbot/' \
44 /usr/local/lib/python*/dist-packages/buildbot_www/static/scripts.js
45
46 RUN \
47 sed -i \
48 "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;" \
49 /usr/local/lib/python*/dist-packages/buildbot_www/static/scripts.js
50
51 ENV LANG=en_US.utf8
52
53 COPY docker/buildmaster/files/entry.sh /entry.sh
54 COPY docker/buildmaster/files/start.sh /start.sh
55 COPY phase1 /phase1
56 COPY phase2 /phase2
57 COPY scripts /scripts
58
59 RUN \
60 groupadd buildbot && \
61 useradd \
62 --create-home --home-dir /master \
63 --comment "OpenWrt buildbot" \
64 --gid buildbot --shell /bin/bash buildbot && \
65 chown buildbot:buildbot /master && \
66 chmod 0755 /entry.sh /start.sh
67
68 VOLUME [ "/master" ]
69 ENTRYPOINT [ "/entry.sh" ]
70 CMD [ "start" ]