forked from ghaskins/hyperledger-fabric
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
14 lines (14 loc) · 932 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from golang:1.6
# Install RocksDB
RUN cd /opt && git clone --branch v4.1 --single-branch --depth 1 https://github.com/facebook/rocksdb.git && cd rocksdb && make shared_lib
ENV LD_LIBRARY_PATH=/opt/rocksdb:$LD_LIBRARY_PATH
RUN apt-get update && apt-get install -y libsnappy-dev zlib1g-dev libbz2-dev
# Copy GOPATH src and install Peer
RUN mkdir -p /var/openchain/db
RUN mkdir -p /var/openchain/production
WORKDIR $GOPATH/src/github.com/openblockchain/obc-peer/
COPY . .
RUN CGO_CFLAGS="-I/opt/rocksdb/include" CGO_LDFLAGS="-L/opt/rocksdb -lrocksdb -lstdc++ -lm -lz -lbz2 -lsnappy" go install && cp $GOPATH/src/github.com/openblockchain/obc-peer/openchain.yaml $GOPATH/bin
RUN cp $GOPATH/src/github.com/openblockchain/obc-peer/openchain/consensus/obcpbft/config.yaml $GOPATH/bin
# RUN CGO_CFLAGS="-I/opt/rocksdb/include" CGO_LDFLAGS="-L/opt/rocksdb -lrocksdb -lstdc++ -lm -lz -lbz2 -lsnappy" go install
# RUN cd obc-ca && go install