Skip to content

Commit 20358d3

Browse files
committed
ci: fix simulated.Dockerfile build
1 parent aefb991 commit 20358d3

File tree

2 files changed

+31
-8
lines changed

2 files changed

+31
-8
lines changed

base.Dockerfile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
FROM fedora:41
2+
3+
ARG ROCKSDB_COMMIT=ae8fb3e5000e46d8d4c9dbf3a36019c0aaceebff
4+
5+
RUN dnf install -y \
6+
git clang lld gcc-c++ make cmake which gflags-devel snappy-devel zlib-devel bzip2-devel libzstd-devel lz4-devel jemalloc-devel \
7+
&& dnf clean all
8+
9+
WORKDIR /build
10+
11+
# Clone RocksDB and checkout the commit or a specific tag
12+
RUN git clone https://github.com/facebook/rocksdb.git && \
13+
cd rocksdb && \
14+
git checkout ${ROCKSDB_COMMIT} && \
15+
mkdir build && cd build && \
16+
export CC=/usr/bin/clang && \
17+
export CXX=/usr/bin/clang++ && \
18+
cmake -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
19+
-DCMAKE_BUILD_TYPE=Release \
20+
-DWITH_LZ4=ON \
21+
-DWITH_ZSTD=ON \
22+
-DWITH_JEMALLOC=ON \
23+
.. && \
24+
make -j$(nproc) rocksdb && cp librocksdb.a /usr/lib64/librocksdb.a
25+
26+
ENV ROCKSDB_LIB_DIR /usr/lib64

simulated.Dockerfile

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
# syntax=docker/dockerfile:1.2
2-
FROM fedora:43 as builder
2+
FROM fedora-rocksdb as builder
33
WORKDIR /build
44

55
# Install dependencies
6-
ENV ROCKSDB_LIB_DIR /usr/lib
7-
RUN dnf update -y && \
8-
dnf install -y awk clang curl rocksdb-devel rocksdb && \
9-
dnf clean all
10-
6+
ENV ROCKSDB_LIB_DIR /usr/lib64
117
# Install Rust using rustup
128
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
139

1410
# Set up Rust environment
1511
ENV PATH="/root/.cargo/bin:${PATH}"
12+
ENV ROCKSDB_STATIC=1
1613

1714
COPY . .
1815

@@ -22,8 +19,8 @@ RUN --mount=type=cache,target=/usr/local/cargo/registry \
2219
cargo build --release --example network-node && \
2320
cargo build --release --bin tycho --features=debug
2421

25-
FROM fedora:43
22+
FROM fedora:41
2623
RUN mkdir /app
27-
RUN dnf update -y && dnf install -y iproute iputils rocksdb && dnf clean all
24+
RUN dnf update -y && dnf install -y iproute iputils && dnf clean all
2825
COPY --from=builder /build/target/release/examples/network-node /app/network-node
2926
COPY --from=builder /build/target/release/tycho /app/tycho

0 commit comments

Comments
 (0)