sptrakesh/mmdb

By sptrakesh

Updated 8 days ago

Alpine image with C++ wrapper to libmaxminddb

Image
0

2.5K

Alpine image with C++ wrapper library around the libmaxminddb library.

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

FROM sptrakesh/cppbase
RUN apk add --no-cache curl libmaxminddb-dev

WORKDIR /opt
RUN curl -L -O https://www.ccoderun.ca/GeoLite2PP/download/geolite2++-0.0.1-2561-Source.tar.gz \
  && tar xzf geolite2++-0.0.1-2561-Source.tar.gz \
  && cd geolite2++-0.0.1-2561-Source \
  && mkdir build && cd build \
  && cmake \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/opt/local \
    -DBUILD_SHARED_LIBS=OFF \
    .. \
  && make -j8 \
  && make install \
  && rm -f /opt/local/lib/*.so* \
  && rm -rf /opt/local/bin

FROM sptrakesh/cppbase
MAINTAINER Rakesh Vidyadharan <rakesh@sptci.com>

RUN apk add --no-cache libmaxminddb-dev \
  && apk --no-cache del perl python

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

Docker Pull Command

docker pull sptrakesh/mmdb