forked from github/gh-ost
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.itest
31 lines (29 loc) · 1.31 KB
/
Dockerfile.itest
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
FROM --platform=linux/amd64 golang:1.18 AS build
COPY . /gh-ost
RUN apt-get update && apt-get install -y unzip\
# build gh-ost
&& cd /gh-ost \
&& go build -o /tmp/gh-ost go/cmd/gh-ost/main.go \
# build dbdeployer
&& cd / \
&& wget -O dbdeployer.zip https://github.com/datacharmer/dbdeployer/archive/refs/tags/v1.69.1.zip \
&& unzip dbdeployer.zip \
&& cd dbdeployer-1.69.1 \
&& go build -o /tmp/dbdeployer main.go \
# tpcc.lua
&& cd / \
&& wget -O tpcc.zip https://github.com/Percona-Lab/sysbench-tpcc/archive/refs/heads/master.zip \
&& unzip tpcc.zip
FROM --platform=linux/amd64 ubuntu:20.04
COPY --from=build /tmp/gh-ost /usr/bin/gh-ost
COPY --from=build /tmp/dbdeployer /usr/bin/dbdeployer
COPY --from=build /sysbench-tpcc-master/*.lua /
COPY ./itest.sh /
# install sysbench
RUN apt-get update && apt-get install -y curl && curl -s https://packagecloud.io/install/repositories/akopytov/sysbench/script.deb.sh | bash \
&& apt-get -y install sysbench libncurses5 numactl
# init dbdeployer & install MySQL 8.0.27
RUN dbdeployer init --skip-all-downloads --skip-shell-completion --skip-tarball-download \
&& dbdeployer downloads get-by-version 8.0.27 --minimal \
&& dbdeployer unpack mysql-8.0.27-linux-glibc2.17-x86_64-minimal.tar.xz --unpack-version 8.0.27
CMD [ "/itest.sh" ]