This repository was archived by the owner on May 31, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (30 loc) · 1.33 KB
/
Dockerfile
File metadata and controls
40 lines (30 loc) · 1.33 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
FROM alpine:latest
WORKDIR /home/cppbot
RUN apk add --no-cache build-base make cmake git libsasl tar pkgconfig openssl-dev curl zlib-dev linux-headers
RUN wget https://github.com/mongodb/mongo-c-driver/releases/download/1.17.4/mongo-c-driver-1.17.4.tar.gz && \
tar xzf mongo-c-driver-1.17.4.tar.gz && \
cd mongo-c-driver-1.17.4 && \
mkdir cmake-build && \
cd cmake-build && \
cmake -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF .. && \
cmake --build . --target install
RUN curl -OL https://github.com/mongodb/mongo-cxx-driver/releases/download/r3.6.2/mongo-cxx-driver-r3.6.2.tar.gz && \
tar -xzf mongo-cxx-driver-r3.6.2.tar.gz && \
cd mongo-cxx-driver-r3.6.2/build && \
cmake .. -DCMAKE_CXX_STANDARD=17 -DCMAKE_INSTALL_PREFIX=/usr/local && \
cmake --build . --target install
RUN git clone --recursive https://github.com/zeroxs/aegis.cpp && \
cd aegis.cpp && \
CXX=$CXX sh ./install-deps.sh && \
mkdir -p build && \
cd build && \
CXX=$CXX cmake -DCMAKE_CXX_STANDARD=17 .. && \
cmake --build . --target install
COPY . .
RUN mkdir -p build && \
cd build && \
CXX=$CXX cmake .. && \
cmake --build .
RUN apk del git tar curl
RUN rm -rf mongo-c-driver-1.17.4.tar.gz mongo-cxx-driver-r3.6.2.tar.gz mongo-c-driver-1.17.4 mongo-cxx-driver-r3.6.2 aegis.cpp
CMD ["/home/cppbot/bin/cppbot"]