From 5c8c0d65b9062dcbe195e7131a6a3c3fb8ba9583 Mon Sep 17 00:00:00 2001 From: Zach Koopmans Date: Wed, 15 Jul 2020 18:19:52 -0700 Subject: Port httpd benchmark PiperOrigin-RevId: 321478001 --- images/benchmarks/httpd/Dockerfile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 images/benchmarks/httpd/Dockerfile (limited to 'images/benchmarks/httpd/Dockerfile') diff --git a/images/benchmarks/httpd/Dockerfile b/images/benchmarks/httpd/Dockerfile new file mode 100644 index 000000000..b72406012 --- /dev/null +++ b/images/benchmarks/httpd/Dockerfile @@ -0,0 +1,17 @@ +FROM ubuntu:18.04 + +RUN set -x \ + && apt-get update \ + && apt-get install -y \ + apache2 \ + && rm -rf /var/lib/apt/lists/* + +# Generate a bunch of relevant files. +RUN mkdir -p /local && \ + for size in 1 10 100 1000 1024 10240; do \ + dd if=/dev/zero of=/local/latin${size}k.txt count=${size} bs=1024; \ + done + +# Rewrite DocumentRoot to point to /tmp/html instead of the default path. +RUN sed -i 's/DocumentRoot.*\/var\/www\/html$/DocumentRoot \/tmp\/html/' /etc/apache2/sites-enabled/000-default.conf +COPY ./apache2-tmpdir.conf /etc/apache2/sites-enabled/apache2-tmpdir.conf -- cgit v1.2.3