libsniper.dockerfile 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. FROM ubuntu:20.04
  2. MAINTAINER [email protected]
  3. ENV DEBIAN_FRONTEND noninteractive
  4. RUN apt-get -qq -y update
  5. RUN apt-get -qq -y install --no-install-recommends git cmake libev-dev libgoogle-perftools-dev libfmt-dev make gcc-9 g++-9 libre2-dev libboost-stacktrace-dev
  6. RUN update-alternatives --quiet --remove-all gcc \
  7. ; update-alternatives --quiet --remove-all g++ \
  8. ; update-alternatives --quiet --remove-all cc \
  9. ; update-alternatives --quiet --remove-all cpp \
  10. ; update-alternatives --quiet --install /usr/bin/gcc gcc /usr/bin/gcc-9 20 \
  11. ; update-alternatives --quiet --install /usr/bin/cc cc /usr/bin/gcc-9 20 \
  12. ; update-alternatives --quiet --install /usr/bin/g++ g++ /usr/bin/g++-9 20 \
  13. ; update-alternatives --quiet --install /usr/bin/cpp cpp /usr/bin/g++-9 20 \
  14. ; update-alternatives --quiet --config gcc \
  15. ; update-alternatives --quiet --config cc \
  16. ; update-alternatives --quiet --config g++ \
  17. ; update-alternatives --quiet --config cpp
  18. COPY ./libsniper_bench /libsniper_bench
  19. WORKDIR /libsniper_bench
  20. RUN git config --global http.sslverify false
  21. RUN git clone https://gitlab.com/rtbtech/libs/libsniper.git libs/core
  22. RUN cd libs/core && git checkout 75f5cee4dcdc604d74703f5255e6f4cca20f50ce
  23. RUN mkdir build && cd /libsniper_bench/build && cmake -DCMAKE_BUILD_TYPE=Release -S .. && make --jobs=`nproc`
  24. ARG BENCHMARK_ENV
  25. EXPOSE 8090
  26. CMD ./build/bin/libsniper_bench