-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
84 lines (61 loc) · 2.17 KB
/
Dockerfile
File metadata and controls
84 lines (61 loc) · 2.17 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
FROM ubuntu as sysbench
RUN apt-get -qq update -y \
&& DEBIAN_FRONTEND=noninteractive apt-get -qq install -y \
ca-certificates \
autoconf \
libtool \
git \
pkg-config \
vim \
&& apt-get clean -y \
&& rm -rf /var/cache/apt/archives/* /var/lib/apt/lists/* /tmp/* /var/tmp/*
# xxd was emancipated from vim in zesty
WORKDIR /root
RUN git clone https://github.com/akopytov/sysbench.git
RUN cd sysbench \
&& ./autogen.sh \
&& ./configure --without-mysql --without-gcc-arch \
&& make
# ==================================================================================
FROM ubuntu as filebench
RUN apt-get -qq update -y \
&& DEBIAN_FRONTEND=noninteractive apt-get -qq install -y \
ca-certificates \
autoconf \
automake \
libtool \
bison \
flex \
git \
make \
&& apt-get clean -y \
&& rm -rf /var/cache/apt/archives/* /var/lib/apt/lists/* /tmp/* /var/tmp/*
WORKDIR /root
RUN git clone https://github.com/filebench/filebench.git
RUN cd filebench \
&& libtoolize \
&& aclocal \
&& autoheader \
&& automake --add-missing \
&& autoconf \
&& ./configure \
&& make
# ==================================================================================
FROM golang as benchdrill
RUN apt-get -qq update -y \
&& DEBIAN_FRONTEND=noninteractive apt-get -qq install -y \
ca-certificates \
libsasl2-dev \
&& apt-get clean -y \
&& rm -rf /var/cache/apt/archives/* /var/lib/apt/lists/* /tmp/* /var/tmp/*
COPY . /go/src/github.com/Wolphin-project/benchdrill
WORKDIR /go/src/github.com/Wolphin-project/benchdrill
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o bin/benchdrill ./cmd/benchdrill.go
# ==================================================================================
FROM ubuntu
COPY --from=sysbench /root/sysbench/src/sysbench /usr/local/bin/
COPY --from=filebench /root/filebench/filebench /usr/local/bin/
COPY --from=benchdrill /go/src/github.com/Wolphin-project/benchdrill/bin/benchdrill /usr/local/bin/
WORKDIR /root
COPY config_benchdrill.yml /root/
ENTRYPOINT ["/usr/local/bin/benchdrill"]