Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderPavlenko authored Jan 27, 2021
1 parent 8a9f00b commit 1a0c574
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ FROM golang:1.14-stretch
RUN apt-get update && apt-get install -y \
build-essential git pkg-config libzmq3-dev libgflags-dev libsnappy-dev zlib1g-dev libbz2-dev liblz4-dev
RUN git clone --depth 1 --single-branch -b v6.14.6 https://github.com/facebook/rocksdb.git /rocksdb; \
cd /rocksdb; CFLAGS="-fPIC -mno-avx -mno-avx2" CXXFLAGS=-fPIC make release
cd /rocksdb; CFLAGS="-fPIC -mno-avx -mno-avx2" CXXFLAGS="-fPIC -mno-avx -mno-avx2" make release

WORKDIR /blockbook
ADD . .
RUN CGO_CFLAGS="-I/rocksdb/include" CGO_LDFLAGS="-L/rocksdb -lrocksdb -lstdc++ -lm -lz -ldl -lbz2 -lsnappy -llz4" CFLAGS="-mno-avx -mno-avx2" go build
RUN CGO_CFLAGS="-I/rocksdb/include" CGO_LDFLAGS="-L/rocksdb -lrocksdb -lstdc++ -lm -lz -ldl -lbz2 -lsnappy -llz4" \
CFLAGS="-mno-avx -mno-avx2" CXXFLAGS="-mno-avx -mno-avx2" go build

0 comments on commit 1a0c574

Please sign in to comment.