-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathbase.Dockerfile
More file actions
35 lines (29 loc) · 1.12 KB
/
base.Dockerfile
File metadata and controls
35 lines (29 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
FROM fedora:42
ARG ROCKSDB_COMMIT="v10.4.2"
RUN dnf install -y \
git clang lld gcc-c++ make cmake which gflags-devel zlib-devel bzip2-devel libzstd-devel lz4-devel jemalloc-devel \
&& dnf clean all
WORKDIR /build
# from rocksdb CMakeLists.txt:
# PORTABLE - Minimum CPU arch to support, or 0 = current CPU, 1 = baseline CPU
# Clone RocksDB and checkout the commit or a specific tag
RUN git clone https://github.com/facebook/rocksdb.git && \
cd rocksdb && \
git checkout ${ROCKSDB_COMMIT} && \
mkdir build && cd build && \
export CC=/usr/bin/clang && \
export CXX=/usr/bin/clang++ && \
cmake -DPORTABLE=1 \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_FLAGS="-Wno-nontrivial-memcall" \
-DWITH_LZ4=ON \
-DWITH_ZSTD=ON \
-DWITH_JEMALLOC=ON \
.. && \
make -j$(nproc) rocksdb
# used by https://crates.io/crates/rocksdb to link with librocksdb.a
ENV ROCKSDB_LIB_DIR="/build/rocksdb/build"
ENV ROCKSDB_STATIC=1
# otherwise will not build tycho image with provided librocksdb.a
ENV RUSTFLAGS="-l dylib=stdc++"