Skip to content

Commit

Permalink
build: add RocksDBStore plugin to Dockerfile.sharp
Browse files Browse the repository at this point in the history
Release version of RocksDBStore does not work properly, that's why we
have to build it from source. It also requires RocksDBSharp.dll which
can be fetched from nuget portal. It also requires librocksdb-dev.

See neo-project/neo-modules#330
  • Loading branch information
AnnaShaleva committed Sep 1, 2020
1 parent 3b477fb commit 6d87618
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .docker/build/Dockerfile.sharp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ RUN set -x \
jq \
libssl-dev \
libunwind8 \
librocksdb-dev \
libc6-dev \
# APT cleanup to reduce image size
&& rm -rf /var/lib/apt/lists/*

Expand All @@ -36,7 +38,7 @@ RUN wget -O /opt/neo-cli.zip ${URL} && \
rm -r /neo-cli/linux-x64 && \
rm /opt/neo-cli.zip

ENV MODULES="RpcServer"
ENV MODULES="RpcServer RocksDBStore"
# SimplePolicy ApplicationLogs"
ENV URL="https://github.com/neo-project/neo-modules/releases/download/v${VERSION}-00"

Expand All @@ -47,6 +49,15 @@ RUN for mod in ${MODULES}; do \
rm /tmp/${mod}.zip; \
done

ENV ROCKSDBPKGS="RocksDbSharp"
# RocksDbSharp RocksDbNative
RUN for pkg in ${ROCKSDBPKGS}; do \
wget -O /tmp/rocksdb.zip https://www.nuget.org/api/v2/package/${pkg}/6.2.2; \
unzip -q -d /tmp/rocksdb/ /tmp/rocksdb.zip; \
mv /tmp/rocksdb/lib/netstandard1.6/${pkg}.dll /neo-cli; \
rm -r /tmp/rocksdb.zip /tmp/rocksdb; \
done

# A welcome message for bash users
RUN echo "printf \"\n* Consensus nodes are running in screen sessions, check 'screen -ls'\"" >> /root/.bashrc
RUN echo "printf \"\n* Please report issues to https://github.com/CityOfZion/neo-local\n\n\"" >> /root/.bashrc
Expand Down

0 comments on commit 6d87618

Please sign in to comment.