-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerFile
37 lines (32 loc) · 1.26 KB
/
DockerFile
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
36
37
FROM golang:1.18.4-alpine
RUN echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >>/etc/apk/repositories
RUN apk add --update --no-cache build-base linux-headers git bash perl #wget mercurial g++ autoconf libgflags-dev cmake
RUN apk add --update --no-cache zlib zlib-dev bzip2 bzip2-dev snappy snappy-dev lz4 lz4-dev zstd@testing zstd-dev@testing libtbb-dev@testing libtbb@testing
# installing latest gflags
RUN cd /tmp && \
git clone https://github.com/gflags/gflags.git && \
cd gflags && \
mkdir build && \
cd build && \
cmake -DBUILD_SHARED_LIBS=1 -DGFLAGS_INSTALL_SHARED_LIBS=1 .. && \
make install && \
cd /tmp && \
rm -R /tmp/gflags/
# Install Rocksdb
RUN cd /tmp && \
git clone https://github.com/facebook/rocksdb.git && \
cd rocksdb && \
git checkout v7.4.5 && \
make shared_lib && \
mkdir -p /usr/local/rocksdb/lib && \
mkdir /usr/local/rocksdb/include && \
cp librocksdb.so* /usr/local/rocksdb/lib && \
cp /usr/local/rocksdb/lib/librocksdb.so* /usr/lib/ && \
cp -r include /usr/local/rocksdb/ && \
cp -r include/* /usr/include/ && \
rm -R /tmp/rocksdb/
RUN echo "export LD_LIBRARY_PATH=/usr/local/rocksdb/lib" >>/etc/profile
COPY ./ /rfs/
WORKDIR /rfs/
RUN make build
ENTRYPOINT ["/rfs/main"]