-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
48 lines (39 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
38
39
40
41
42
43
44
45
46
47
48
FROM rabits/qt:5.12-desktop
LABEL maintainer="[email protected]"
USER root
# Install dependencies
RUN apt-get update && apt-get install -y \
cmake \
clang \
libmongoc-1.0-0 \
libbson-1.0 \
libssl-dev \
libsasl2-dev \
wget
ENV MONGOC_VERSION=1.16.2
# Install mongoc driver
WORKDIR /home/user
RUN wget https://github.com/mongodb/mongo-c-driver/releases/download/1.16.2/mongo-c-driver-${MONGOC_VERSION}.tar.gz \
&& tar xzf mongo-c-driver-${MONGOC_VERSION}.tar.gz \
&& cd mongo-c-driver-${MONGOC_VERSION} \
&& mkdir cmake-build \
&& cd cmake-build \
&& cmake -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF .. \
&& make install \
&& rm -rf /home/user/mongo-c-driver-${MONGOC_VERSION}.tar.gz
WORKDIR /home/user
RUN git clone https://github.com/mongodb/mongo-cxx-driver.git \
--branch releases/stable --depth 1 \
&& cd mongo-cxx-driver/build \
&& cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr/local \
&& make EP_mnmlstc_core \
&& make \
&& make install
# Create build directory
RUN mkdir /home/user/build
COPY docker-entrypoint.sh /
RUN chmod +x /docker-entrypoint.sh
COPY . /home/user/SharedEditor
ENTRYPOINT ["/docker-entrypoint.sh"]