forked from TechEmpower/FrameworkBenchmarks
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
61 lines (54 loc) · 1.61 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
FROM ubuntu:24.04
ARG DEBIAN_FRONTEND=noninteractive
# WARNING: DON'T PUT A SPACE AFTER ANY BACKSLASH OR APT WILL BREAK
# One -q produces output suitable for logging (mostly hides
# progress indicators)
RUN apt-get -yqq update && \
apt-get -yqq install \
-o Dpkg::Options::="--force-confdef" \
-o Dpkg::Options::="--force-confold" \
cloc \
curl \
gcc \
git-core \
gosu \
# Needed for mysqlclient
libmysqlclient-dev \
libpq-dev \
pkg-config \
python3 \
python3-colorama \
python3-dev \
python3-dnspython \
python3-packaging \
python3-pip \
python3-psutil \
python3-psycopg2 \
python3-requests \
siege \
software-properties-common && \
# Ubuntu's equivalent packages are too old and/or broken.
pip3 install \
--break-system-packages \
docker==7.0.0 \
mysqlclient==2.2.4 \
pymongo==4.7.2
# Collect resource usage statistics
ARG DOOL_VERSION=v1.3.1
WORKDIR /tmp
RUN curl -LSs "https://github.com/scottchiefbaker/dool/archive/${DOOL_VERSION}.tar.gz" | \
tar --strip-components=1 -xz && \
./install.py
# Check if the group ID is already created
ARG GROUP_ID
RUN if ! getent group "$GROUP_ID"; then \
addgroup --gid "$GROUP_ID" user; \
fi
# Check if the user ID is already created
ARG USER_ID
RUN if ! getent passwd "$USER_ID"; then \
adduser --disabled-password --gecos '' --gid "$GROUP_ID" --uid "$USER_ID" user; \
fi
ENV FWROOT=/FrameworkBenchmarks USER_ID="$USER_ID"
ENV PYTHONPATH="$FWROOT"
ENTRYPOINT ["/FrameworkBenchmarks/entrypoint.sh"]