Dockerfile.rocksdb_dev_env 562 B

12345678910111213141516
  1. FROM golang:1.19-buster as builder
  2. RUN apt-get update
  3. RUN apt-get install -y build-essential libsnappy-dev zlib1g-dev libbz2-dev libgflags-dev liblz4-dev libzstd-dev
  4. ENV ROCKSDB_VERSION v7.5.3
  5. # build RocksDB
  6. RUN cd /tmp && \
  7. git clone https://github.com/facebook/rocksdb.git /tmp/rocksdb --depth 1 --single-branch --branch $ROCKSDB_VERSION && \
  8. cd rocksdb && \
  9. PORTABLE=1 make static_lib && \
  10. make install-static
  11. ENV CGO_CFLAGS "-I/tmp/rocksdb/include"
  12. ENV CGO_LDFLAGS "-L/tmp/rocksdb -lrocksdb -lstdc++ -lm -lz -lbz2 -lsnappy -llz4 -lzstd"