poco.dockerfile 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. FROM ubuntu:16.04
  2. RUN apt-get update
  3. RUN apt-get install -qqy software-properties-common build-essential curl locales wget unzip git \
  4. libmysqlclient-dev libpq-dev \
  5. libpcre3 libpcre3-dev \
  6. libssl-dev libcurl4-openssl-dev \
  7. zlib1g-dev \
  8. libreadline6-dev \
  9. libbz2-dev \
  10. libxslt-dev libgdbm-dev ncurses-dev \
  11. libffi-dev libtool bison libevent-dev \
  12. libgstreamer-plugins-base0.10-0 libgstreamer0.10-0 \
  13. liborc-0.4-0 libgnutls-dev \
  14. libjson0-dev libmcrypt-dev libicu-dev \
  15. re2c libnuma-dev
  16. RUN locale-gen en_US.UTF-8
  17. ENV LANG en_US.UTF-8
  18. ENV LANGUAGE en_US:en
  19. ENV LC_ALL en_US.UTF-8
  20. ENV DEBIAN_FRONTEND noninteractive
  21. RUN add-apt-repository -y ppa:ubuntu-toolchain-r/test
  22. RUN apt update -y
  23. RUN apt install -qqy g++-4.8
  24. RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50
  25. ENV POCO_VERSION 1.6.1
  26. ENV POCO_HOME /poco
  27. WORKDIR ${POCO_HOME}
  28. RUN curl -sL http://pocoproject.org/releases/poco-${POCO_VERSION}/poco-${POCO_VERSION}-all.tar.gz | tar xz --strip-components=1
  29. RUN ./configure --no-tests --no-samples
  30. RUN make --quiet PageCompiler-libexec XML-libexec JSON-libexec
  31. ENV LD_LIBRARY_PATH ${POCO_HOME}/lib/Linux/x86_64
  32. COPY benchmark.cpp benchmark.cpp
  33. RUN g++-4.8 \
  34. -O3 \
  35. -DNDEBUG \
  36. -std=c++0x \
  37. -o \
  38. poco \
  39. benchmark.cpp \
  40. -I${POCO_HOME}/Foundation/include \
  41. -I${POCO_HOME}/Util/include \
  42. -I${POCO_HOME}/Net/include \
  43. -L${POCO_HOME}/lib/Linux/x86_64 \
  44. -lPocoNet \
  45. -lPocoUtil \
  46. -lPocoFoundation \
  47. -lPocoXML \
  48. -lPocoJSON
  49. CMD ./poco 8080 $(nproc)