ci: docker: deploy automatically only on default branch and tags
[buildbot.git] / docker / buildworker / 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 BUILDWORKER_MASTER builds.openwrt.org:9990
9 ENV BUILDWORKER_ADMIN contact@openwrt.org
10 ENV BUILDWORKER_DESCRIPTION Docker Container https://git.openwrt.org/$OPENWRT_VERSION
11
12 USER root
13
14 RUN \
15 apt-get update && \
16 apt-get install -y \
17 build-essential \
18 ccache \
19 curl \
20 gawk \
21 gcc-multilib \
22 genisoimage \
23 git-core \
24 gosu \
25 libdw-dev \
26 libelf-dev \
27 libncurses5-dev \
28 locales \
29 pv \
30 pwgen \
31 python \
32 python3 \
33 python3-pip \
34 qemu-utils \
35 rsync \
36 signify-openbsd \
37 subversion \
38 swig \
39 unzip \
40 wget && \
41 apt-get clean && \
42 localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
43
44 RUN pip3 install -U pip
45 RUN pip3 install \
46 "buildbot-worker==$BUILDBOT_VERSION" \
47 pyOpenSSL \
48 service_identity
49
50 ENV LANG=en_US.utf8
51
52 COPY docker/buildworker/files/entry.sh /entry.sh
53 COPY docker/buildworker/files/start.sh /start.sh
54
55 RUN \
56 groupadd buildbot && \
57 useradd \
58 --create-home --home-dir /builder \
59 --comment "OpenWrt buildbot" \
60 --gid buildbot --shell /bin/bash buildbot && \
61 chown buildbot:buildbot /builder && \
62 chmod 0755 /entry.sh /start.sh
63
64 VOLUME [ "/builder" ]
65 ENTRYPOINT [ "/entry.sh" ]
66 CMD [ "/start.sh" ]