Skip to content

Instantly share code, notes, and snippets.

@grkvlt
Last active December 20, 2017 19:48
Show Gist options
  • Save grkvlt/24f5428c06d541ed1d3e7389585ae8c9 to your computer and use it in GitHub Desktop.
Save grkvlt/24f5428c06d541ed1d3e7389585ae8c9 to your computer and use it in GitHub Desktop.
Dockerfile for Sawtooth smallbank-workload Perf Tool
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