Files
dolt/go/performance/continuous_integration/SysbenchDockerfile

64 lines
1.5 KiB
Plaintext

FROM --platform=linux/amd64 golang:1.21.2-bullseye
ENV DEBIAN_FRONTEND=noninteractive
# Get sysbench installed
RUN apt update
RUN apt install -y curl
# Install sysbench deps
RUN apt update -y && apt install -y \
automake \
libtool \
pkg-config \
libaio-dev \
default-libmysqlclient-dev \
libssl-dev
# Build sysbench from source
RUN git clone https://github.com/akopytov/sysbench.git && \
cd sysbench && \
git checkout -b 1.0.20 tags/1.0.20 && \
./autogen.sh && \
./configure && \
make -j && \
make install
# Install sqlite3 from source
RUN \
apt-get install -y \
build-essential \
tcl \
lsb-release \
&& wget \
-O sqlite.tar.gz \
https://www.sqlite.org/src/tarball/sqlite.tar.gz?r=release \
&& tar xvfz sqlite.tar.gz \
# Configure and make SQLite3 binary
&& ./sqlite/configure --prefix=/usr \
&& make \
&& make install \
# Smoke test
&& sqlite3 --version
WORKDIR /
COPY ./go /dolt/go
COPY ./config.json /config.json
COPY ./tpcc-config.json /tpcc-config.json
COPY ./sysbench-runner-tests-entrypoint.sh /entrypoint.sh
RUN git clone https://github.com/dolthub/sysbench-lua-scripts.git
RUN git clone https://github.com/Percona-Lab/sysbench-tpcc.git
WORKDIR /mysql
RUN curl -L -O https://dev.mysql.com/get/mysql-apt-config_0.8.22-1_all.deb
RUN dpkg -i mysql-apt-config_0.8.22-1_all.deb
RUN apt-get update && apt-get install -y mysql-server
RUN mysql --version
# Install dolt
WORKDIR /dolt/go/cmd/dolt
RUN go build -o /usr/local/bin/dolt .
WORKDIR /dolt/go/performance/utils/sysbench_runner/cmd
ENTRYPOINT ["/entrypoint.sh"]