-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy patheco-php-ubuntu-2004.dockerfile
More file actions
73 lines (63 loc) · 2.62 KB
/
eco-php-ubuntu-2004.dockerfile
File metadata and controls
73 lines (63 loc) · 2.62 KB
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
72
73
#
# Buildbot worker for building and running PHP against mariadb server
#
# Provides a base Ubuntu image with latest buildbot worker installed
# and PHP build dependencies
FROM ubuntu:20.04
LABEL maintainer="MariaDB Buildbot maintainers"
ARG DEBIAN_FRONTEND=noninteractive
# libaio1, snappy/numa is for the mariadb tarball
# libreadline5 for mariadb client
# curl, git used in intialization, rest are
# for php.
RUN apt-get update -y && \
apt-get install -y \
libaio1 \
liblzo2-2 liblzma5 libbz2-1.0 \
libsnappy1v5 libnuma1 libreadline5 libpmem1 \
python3 python3-pip \
curl \
language-pack-de \
libgmp-dev \
libicu-dev \
libtidy-dev \
libenchant-dev \
libaspell-dev \
libpspell-dev \
librecode-dev \
libsasl2-dev \
libxpm-dev \
libzip-dev \
git \
pkg-config \
build-essential \
autoconf \
bison \
re2c \
libxml2-dev \
libsqlite3-dev \
libmysqlclient-dev && \
rm -rf /var/lib/apt/lists/*
# Create buildbot user
RUN useradd -ms /bin/bash buildbot && \
mkdir -p /buildbot /data && \
chown -R buildbot /buildbot /data /usr/local && \
curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/buildbot/main/dockerfiles/buildbot.tac
# pam tests
RUN for t in auth account; do echo "$t required pam_unix.so audit"; done >> /etc/pam.d/mysql
# password: pamtest, but needed to be passed in crypt format otherwise silently ignored
RUN useradd -m pamtest --password '$6$HGAoutbdknZeXJOb$1sQ5xzaCC0KUmc10FeVUFZSS1LbhoI/1hEEhaqe7zLLINGfnq7tz1lqjbXenIiNwe5m9TKGs4Lx68tQ/lrO9A1'
# Hope to eventualy move away from needing sudo rights
RUN usermod -a -G sudo buildbot
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
WORKDIR /buildbot
# Upgrade pip and install packages
RUN pip3 install -U pip virtualenv
RUN pip3 install automat==22.10 && \
pip3 install buildbot-worker && \
pip3 --no-cache-dir install 'twisted[tls]'
# Test runs produce a great quantity of dead grandchild processes. In a
# non-docker environment, these are automatically reaped by init (process 1),
# so we need to simulate that here. See https://github.com/Yelp/dumb-init
RUN curl https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_$(dpkg --print-architecture).deb -Lo /tmp/init.deb && dpkg -i /tmp/init.deb
CMD ["/usr/bin/dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"]