sptrakesh/cpr

By sptrakesh

Updated 8 days ago

Alpine image with https://github.com/whoshuu/cpr

Image
0

1.3K

Alpine image built with the following Dockerfile.

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

FROM sptrakesh/cppbase

ENV VERSION=1.6.2

WORKDIR /opt
RUN apk --update --no-cache add curl-dev libexecinfo-dev \
  && git clone --branch ${VERSION} https://github.com/whoshuu/cpr.git \
  && cd cpr \
  && mkdir build && cd build \
  && cmake \
    -DCMAKE_CXX_STANDARD=17 \
    -DCMAKE_CXX_STANDARD_REQUIRED=ON \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_PREFIX_PATH=/opt/local \
    -DCMAKE_INSTALL_PREFIX=/opt/local \
    -DCMAKE_INSTALL_LIBDIR=lib \
    -DBUILD_SHARED_LIBS=OFF \
    -DCPR_FORCE_USE_SYSTEM_CURL=ON \
    -DCPR_BUILD_TESTS=OFF \
    .. \
  && make -j8 \
  && make install

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

ENV VERSION=1.6.2
RUN apk --update --no-cache add libexecinfo libcurl

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

Docker Pull Command

docker pull sptrakesh/cpr