-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
72 lines (64 loc) · 1.81 KB
/
Dockerfile
File metadata and controls
72 lines (64 loc) · 1.81 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
FROM mcr.microsoft.com/dotnet/sdk:10.0-alpine
# Setup Dotnet Core tools global path
ENV PATH="${PATH}:/root/.dotnet/tools"
###
### Install Rocksdb library
### see: https://github.com/savsgio/docker-rocksdb/blob/main/Dockerfile
###
ARG ROCKSDB_VERSION=v10.9.1
ENV ROCKSDB_VERSION=$ROCKSDB_VERSION
LABEL rocksdb.version=$ROCKSDB_VERSION
RUN apk update \
&& apk --no-cache add \
binutils \
# Install bash
bash \
bash-completion \
bash-doc \
# Install extensions dependencies
curl \
git \
libxml2-dev \
openldap-dev \
openssh \
unzip \
wget \
# Rocksdb dependencies
zlib-dev \
bzip2-dev \
lz4-dev \
snappy-dev \
zstd-dev \
gflags-dev \
build-base \
linux-headers \
perl \
&& mkdir /usr/src && \
cd /usr/src && \
git clone --depth 1 --branch ${ROCKSDB_VERSION} https://github.com/facebook/rocksdb.git && \
cd /usr/src/rocksdb && \
# Fix missing cstdint includes for newer GCC (add to all headers that need it)
find . \( -name "*.h" -o -name "*.cc" \) -exec grep -l "rocksdb_namespace.h" {} \; | \
xargs sed -i '/#include "rocksdb\/rocksdb_namespace.h"/a #include <cstdint>' && \
# Fix 'install -c' flag
sed -i 's/install -C/install -c/g' Makefile && \
PORTABLE=1 make -j4 shared_lib && \
make install-shared \
&& rm -rf /usr/src/rocksdb
### / Rocksdb
# build scripts
COPY ./build.sh /lib/
COPY ./build /lib/build
COPY ./paket.dependencies /lib/
COPY ./paket.references /lib/
COPY ./paket.lock /lib/
# sources
COPY ./RocksDb.fsproj /lib/
COPY ./src /lib/src
COPY ./tests /lib/tests
# others
COPY ./.git /lib/.git
COPY ./.config /lib/.config
COPY ./fsharplint.json /lib/
WORKDIR /lib
CMD ["./build.sh", "-t", "tests"]