-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
56 lines (41 loc) · 1.32 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
FROM debian:jessie
MAINTAINER LiXianJing<lixianjing@zlg.cn>
# Set the reset cache variable
ENV REFRESHED_AT 2017-09-03
ENV DEBIAN_FRONTEND noninteractive
# Update packages list
RUN apt-get update -y
# Install useful packages
# RUN apt-get install -y strace procps tree vim git curl wget gnuplot
# Install required software
RUN apt-get install -y git make build-essential libssl-dev
# Install wrk - benchmarking software
# Resource: https://github.com/wg/wrk/wiki/Installing-Wrk-on-Linux
WORKDIR /tmp
# Install Luarocks dependencies
RUN apt-get install -y curl \
make \
unzip \
lua5.1 \
liblua5.1-dev
# Install Luarocks - a lua package manager
RUN curl https://keplerproject.github.io/luarocks/releases/luarocks-2.2.2.tar.gz -O &&\
tar -xzvf luarocks-2.2.2.tar.gz &&\
cd luarocks-2.2.2 &&\
./configure &&\
make build &&\
make install
# Install the cjson package
RUN luarocks install lua-cjson
RUN git clone https://github.com/xianjimli/wrk.git &&\
cd wrk && \
make && \
mv wrk /usr/local/bin && \
cp -rvf scripts /
WORKDIR /
# Cleanup
RUN apt-get clean
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Raise the limits to successfully run benchmarks
RUN ulimit -c -m -s -t unlimited
ENV DEBIAN_FRONTEND=newt