libmongoc From Source With Docker
mongo-swift-driver to run, the minimum required version of the
C Driver is 1.13.0. The easiest way to get the correct version
libbson is to checkout the correct
branch from git and
build the sources.
- Ubuntu 16.04 / 18.04
RUN git clone -b r1.13 https://github.com/mongodb/mongo-c-driver /tmp/libmongoc WORKDIR /tmp/libmongoc RUN cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr RUN make -j8 install
cmake prefixes are:
-DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFFsee reference here.
-DCMAKE_BUILD_TYPE=Releaseto build a release optimized build.
When building and running Vapor in Docker, the C Driver is needed in both the
builder and runner containers. See
Dockerfile.vapor for an example.