seaweedfs/docker/Dockerfile.rocksdb_dev_env

17 lines
562 B
Docker
Raw Normal View History

2023-10-13 20:31:43 +08:00
FROM golang:1.21-buster as builder
2022-09-02 00:44:48 +08:00
RUN apt-get update
RUN apt-get install -y build-essential libsnappy-dev zlib1g-dev libbz2-dev libgflags-dev liblz4-dev libzstd-dev
2023-05-30 14:14:45 +08:00
ENV ROCKSDB_VERSION v8.1.1
2022-09-02 00:44:48 +08:00
# build RocksDB
RUN cd /tmp && \
git clone https://github.com/facebook/rocksdb.git /tmp/rocksdb --depth 1 --single-branch --branch $ROCKSDB_VERSION && \
cd rocksdb && \
PORTABLE=1 make static_lib && \
make install-static
ENV CGO_CFLAGS "-I/tmp/rocksdb/include"
ENV CGO_LDFLAGS "-L/tmp/rocksdb -lrocksdb -lstdc++ -lm -lz -lbz2 -lsnappy -llz4 -lzstd"