-
Notifications
You must be signed in to change notification settings - Fork 146
/
Copy pathDockerFile-Ubuntu-x64-ffead-cpp-bazel
82 lines (71 loc) · 3.31 KB
/
DockerFile-Ubuntu-x64-ffead-cpp-bazel
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
73
74
75
76
77
78
79
80
81
82
FROM ubuntu:latest
ENV DEBIAN_FRONTEND noninteractive
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
RUN apt update -yqq && apt install -yqq gcc g++ software-properties-common cmake unzip libpcre3-dev zlib1g-dev libpq-dev \
libssl-dev uuid-dev odbc-postgresql unixodbc unixodbc-dev libcurl4-openssl-dev libmemcached-dev wget netcat-traditional \
rapidjson-dev libpugixml-dev pkg-config zip && rm -rf /var/lib/apt/lists/*
RUN wget -q https://github.com/bazelbuild/bazel/releases/download/6.4.0/bazel-6.4.0-installer-linux-x86_64.sh
RUN chmod +x bazel-6.4.0-installer-linux-x86_64.sh && ./bazel-6.4.0-installer-linux-x86_64.sh --user
ENV PATH="/root/bin:${PATH}"
#RUN wget -q https://github.com/sumeetchhetri/shellb/releases/download/1.0.1/shellb -P /usr/local/bin && chmod +x /usr/local/bin/shellb
#Install libcuckoo headers
WORKDIR /tmp
RUN wget -q https://github.com/efficient/libcuckoo/archive/master.zip
RUN unzip -qq master.zip
RUN rm -f master.zip
WORKDIR /tmp/libcuckoo-master
RUN cmake -DCMAKE_INSTALL_PREFIX=/usr/local/ .
RUN make install
WORKDIR /tmp
RUN rm -rf /tmp/libcuckoo-master
RUN wget -q https://github.com/redis/hiredis/archive/v1.0.0.tar.gz
RUN tar xf v1.0.0.tar.gz
RUN rm -f v1.0.0.tar.gz
RUN cd hiredis-1.0.0/ && cmake . && make install
WORKDIR /tmp
RUN rm -rf hiredis-1.0.0
RUN wget -q https://github.com/sewenew/redis-plus-plus/archive/refs/tags/1.3.10.tar.gz
RUN tar xf 1.3.10.tar.gz
RUN rm -f 1.3.10.tar.gz
WORKDIR redis-plus-plus-1.3.10/
RUN mkdir build
WORKDIR build
RUN cmake -DREDIS_PLUS_PLUS_CXX_STANDARD=17 .. && make && make install
WORKDIR /tmp
RUN rm -rf redis-plus-plus-1.3.10
#Install mongodb c driver
#RUN wget -q https://github.com/mongodb/mongo-c-driver/releases/download/1.4.2/mongo-c-driver-1.4.2.tar.gz
#RUN tar xf mongo-c-driver-1.4.2.tar.gz
#RUN rm -f mongo-c-driver-1.4.2.tar.gz
#RUN cd mongo-c-driver-1.4.2/ && ./configure --disable-automatic-init-and-cleanup --disable-tests --disable-ssl --disable-sasl && make && make install
#WORKDIR /tmp
#RUN rm -rf mongo-c-driver-1.4.2
ENV VERSION=1.26.2
RUN wget "https://github.com/mongodb/mongo-c-driver/archive/refs/tags/$VERSION.tar.gz" --output-document="mongo-c-driver-$VERSION.tar.gz"
RUN tar xf "mongo-c-driver-$VERSION.tar.gz"
RUN rm -f "mongo-c-driver-$VERSION.tar.gz"
RUN cd mongo-c-driver-$VERSION/ && mkdir _build && cmake -S . -B _build \
-D ENABLE_EXTRA_ALIGNMENT=OFF \
-D ENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -D ENABLE_TESTS=OFF -D ENABLE_EXAMPLES=OFF \
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
-D BUILD_VERSION="$VERSION" \
-D ENABLE_SSL=OFF \
-D ENABLE_SASL=OFF \
-D ENABLE_MONGOC=ON && cmake --build _build --config RelWithDebInfo --parallel && cmake --install _build
RUN rm -rf "mongo-c-driver-$VERSION"
#Install ffead-cpp
WORKDIR /tmp
RUN wget -q https://github.com/sumeetchhetri/ffead-cpp/archive/master.zip
RUN unzip -qq master.zip
RUN mv ffead-cpp-master ffead-cpp-src
RUN rm -f master.zip
WORKDIR /tmp/ffead-cpp-src
#RUN rm -f /usr/local/bin/shellb && wget -q https://github.com/sumeetchhetri/shellb/releases/download/2.0.0/shellb -P /usr/local/bin && chmod +x /usr/local/bin/shellb
RUN chmod +x ./shellb && ./shellb ffead-cpp-bazel
RUN mv /tmp/ffead-cpp-src/shellb_out/ffead-cpp-7.0-bin /tmp/
WORKDIR /tmp
RUN rm -rf /tmp/ffead-cpp-src
COPY *.sh /opt/
WORKDIR /opt
RUN chmod +x install_ffead-cpp.sh
RUN ./install_ffead-cpp.sh