-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
38 lines (27 loc) · 1.38 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
# adapted from https://github.com/opsani/servo-ec2asg-newrelic/blob/master/Dockerfile
FROM python:3.6-slim
WORKDIR /servo
# Install dependencies (use latest pip packages)
# hadolint ignore=DL3013
RUN apt-get update && apt-get install -y --no-install-recommends apache2-utils curl \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& pip3 install requests PyYAML python-dateutil boto3
RUN mkdir encoders/
# Install servo: ec2win adjust (which uses the servo base adjust.py) and
# apache benchmark measure (which uses the servo base measure.py) and
# dotnet encoder (which users encoders/base.py)
ADD https://raw.githubusercontent.com/opsani/servo/master/servo \
https://raw.githubusercontent.com/opsani/servo/master/adjust.py \
https://raw.githubusercontent.com/opsani/servo/master/measure.py \
https://raw.githubusercontent.com/opsani/servo-ab/master/measure \
./adjust \
/servo/
ADD https://raw.githubusercontent.com/opsani/servo/master/encoders/base.py \
https://raw.githubusercontent.com/kumulustech/encoder-dotnet/master/encoders/dotnet.py \
/servo/encoders/
# RUN sed -i 's/10000000, # request limit/100, # request limit/' measure
RUN sed -i 's/30, # warmup time in seconds/0, # warmup time in seconds/' measure
RUN chmod a+rwx /servo/adjust /servo/measure /servo/servo
ENV PYTHONUNBUFFERED=1
ENTRYPOINT [ "python3", "servo" ]