forked from MariaDB/buildbot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
71 lines (69 loc) · 2.08 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Buildbot master and master-web containers
FROM debian:11-slim
LABEL maintainer="MariaDB Buildbot maintainers"
ARG DEBIAN_FRONTEND=noninteractive
ARG master_type="master"
WORKDIR /opt/buildbot
# hadolint ignore=DL3003
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get -y install --no-install-recommends \
build-essential \
git \
libmariadb-dev \
libvirt-dev \
netcat \
openssh-client \
pkg-config \
python3 \
python3-dev \
python3-distutils \
python3-pip \
python3-venv \
&& if [ "$master_type" = "master-web" ]; then \
apt-get -y install --no-install-recommends \
libcairo2 \
yarnpkg; \
export PATH="/usr/share/nodejs/yarn/bin:$PATH"; \
yarn global --ignore-engines add gulp yo generator-buildbot-dashboard; \
fi \
&& git clone --branch grid https://github.com/vladbogo/buildbot . \
&& python3 -m venv .venv \
&& . .venv/bin/activate \
&& if [ "$master_type" = "master-web" ]; then \
make frontend; \
fi \
&& pip install --no-cache-dir wheel \
&& pip install --no-cache-dir autobahn==20.7.1 PyJWT==1.7.1 \
&& cd master && python setup.py bdist_wheel \
&& pip install --no-cache-dir dist/*.whl \
&& pip install --no-cache-dir pip -U \
&& pip install --no-cache-dir \
buildbot-prometheus \
buildbot-worker \
docker==4.3.1 \
flask \
libvirt-python \
mock \
mysqlclient \
pyzabbix \
sqlalchemy==1.3.23 \
treq \
&& if [ "$master_type" = "master-web" ]; then \
pip install --no-cache-dir pyjade; \
fi \
&& ln -s /opt/buildbot/.venv/bin/buildbot /usr/local/bin/buildbot \
# cleaning \
&& apt-get purge -y \
build-essential \
pkg-config \
python3-dev \
python3-pip \
python3-venv \
&& if [ "$master_type" = "master-web" ]; then \
apt-get purge -y yarnpkg; \
rm -rf "$(find /opt/buildbot -maxdepth 3 -name node_modules)"; \
fi \
&& apt-get autoremove -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*