forked from quay/quay-performance-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (26 loc) · 1.18 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
FROM ubuntu
LABEL maintainer="syahmed@redhat.com"
WORKDIR /tmp
ARG DEBIAN_FRONTEND=noninteractive
# Install necessary libraries for subsequent commands
RUN apt-get update && apt-get install -y podman wget git dumb-init python3.6 python3-distutils python3-pip python3-apt redis-server
# Install vegeta for HTTP benchmarking
RUN wget https://github.com/tsenart/vegeta/releases/download/v12.8.3/vegeta-12.8.3-linux-amd64.tar.gz \
&& tar -xzf vegeta-12.8.3-linux-amd64.tar.gz \
&& mv vegeta /usr/local/bin/vegeta \
&& rm -rf vegeta-12.8.3-linux-amd64.tar.gz
# Install and setup snafu for storing vegeta results into ES
RUN mkdir -p /opt/snafu/ \
&& wget -O /tmp/benchmark-wrapper.tar.gz https://github.com/cloud-bulldozer/benchmark-wrapper/archive/refs/tags/v1.0.0.tar.gz \
&& tar -xzf /tmp/benchmark-wrapper.tar.gz -C /opt/snafu/ --strip-components=1 \
&& pip3 install --upgrade pip \
&& pip3 install -e /opt/snafu/ \
&& rm -rf /tmp/benchmark-wrapper.tar.gz
COPY . .
# Cleanup the installation remainings
RUN apt-get clean autoclean && \
apt-get autoremove --yes && \
rm -rf /var/lib/{apt,dpkg,cache,log}/
# Start the command
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD ["python3", "main.py"]