You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
555 B

12 months ago
  1. FROM golang:1.21 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 v8.1.1
  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"