Last active
December 20, 2017 19:48
-
-
Save grkvlt/24f5428c06d541ed1d3e7389585ae8c9 to your computer and use it in GitHub Desktop.
Dockerfile for Sawtooth smallbank-workload Perf Tool
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:xenial | |
# install packages required | |
WORKDIR /build | |
RUN apt-get update -y && \ | |
apt-get install -y -q wget libssl-dev git curl python3 python3-pip && \ | |
python3 -m pip install grpcio && \ | |
python3 -m pip install grpcio-tools | |
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y | |
RUN wget https://github.com/zeromq/libzmq/releases/download/v4.2.2/zeromq-4.2.2.tar.gz && \ | |
tar zxf zeromq-4.2.2.tar.gz && \ | |
cd zeromq-4.2.2 && \ | |
./configure && \ | |
make install | |
# clone sawtooth github repo | |
RUN git clone https://github.com/grkvlt/sawtooth-core /build/sawtooth-core | |
WORKDIR /build/sawtooth-core | |
# build workload generator | |
RUN ./bin/protogen && \ | |
export PATH=/root/.cargo/bin:${PATH} && \ | |
cargo install protobuf && \ | |
export LIBZMQ_PREFIX=/usr/local && \ | |
export RUSTFLAGS="-C link-args=-Wl,-rpath,/usr/local/lib" && \ | |
./bin/build_rust && \ | |
cd ./perf/smallbank_workload && \ | |
cargo build --release && \ | |
cp ./target/release/smallbank_workload /bin | |
# delete intermnediate files | |
RUN rm -rf /build && \ | |
apt-get clean && \ | |
rm -rf /var/lib/apt/lists/* | |
# setup image entrypoint | |
WORKDIR /data | |
VOLUME /data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment