Sign inSign up

sptrakesh/mongocxx-boost

By sptrakesh

•Updated 5 days ago

Container with boost and mongo c/c++ libraries

Image
0

10K+

sptrakesh/mongocxx-boost repository overview

Alpine based image with boost and Mongo C/C++ libraries. All libraries are installed under /opt/local and are built only as static libraries.

Note: The gcc tag is built off the latest gcc⁠ base image.

FROM sptrakesh/boost
RUN apk add --no-cache curl perl snappy-dev

ENV MONGOC_VERSION=1.14.0 \
  MONGOCXX_VERSION=3.4.0

WORKDIR /opt
RUN curl -L -O https://github.com/mongodb/mongo-c-driver/releases/download/${MONGOC_VERSION}/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 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/local -DBUILD_SHARED_LIBS=OFF -DENABLE_TESTS=OFF .. \
  && make -j8 \
  && make install

WORKDIR /opt
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_PREFIX_PATH=/opt/local -DCMAKE_INSTALL_PREFIX=/opt/local -DBUILD_SHARED_LIBS=OFF -DCMAKE_TESTING_ENABLED=OFF .. \
  && make -j8 \
  && make install \
  && for i in `ls /opt/local/lib64/pkgconfig`; do sed -i -e 's;libdir=${prefix}/lib;libdir=${prefix}/lib64;g' /opt/local/lib64/pkgconfig/$i; done \
  && apk --update --no-cache del perl

FROM sptrakesh/cppbase
MAINTAINER Rakesh Vidyadharan <[email protected]>

ENV MONGOC_VERSION=1.4.0 \
  MONGOCXX_VERSION=3.4.0

RUN apk --update --no-cache add snappy-dev \
  && apk --update --no-cache del perl

WORKDIR /opt
COPY --from=0 /opt/local local

Tag summary

Content type

Image

Digest

sha256:cb0a68298…

Size

236.7 MB

Last updated

5 days ago

docker pull sptrakesh/mongocxx-boost