From 04a383c4fbde4e9dcdfbd9c9bf7971575a80d11d Mon Sep 17 00:00:00 2001 From: Seva <seva@binarytrails.net> Date: Thu, 22 Aug 2019 16:43:43 -0400 Subject: [PATCH] docker: fix deps & depsllvm --- docker/DockerfileDeps | 38 ++++++++++++++++++++++++------------ docker/DockerfileDepsLlvm | 41 ++++++++++++++++++++++++++------------- 2 files changed, 54 insertions(+), 25 deletions(-) diff --git a/docker/DockerfileDeps b/docker/DockerfileDeps index 52493321..7ed0f2a8 100644 --- a/docker/DockerfileDeps +++ b/docker/DockerfileDeps @@ -3,32 +3,46 @@ MAINTAINER Adrien Béraud <adrien.beraud@savoirfairelinux.com> RUN apt-get update && apt-get install -y \ build-essential cmake git wget libncurses5-dev libreadline-dev nettle-dev \ libgnutls28-dev libuv1-dev cython3 python3-dev libcppunit-dev libjsoncpp-dev \ - && apt-get clean - -RUN echo "*** Installing libssl, libasio & libhttp-parser ***" \ - && apt-get update && apt-get install -y libasio-dev libssl-dev libhttp-parser-dev \ + autotools-dev autoconf libasio-dev \ && apt-get clean RUN echo "*** Installing libfmt ***" \ && wget https://github.com/fmtlib/fmt/archive/5.3.0.tar.gz \ - && tar -xzf 5.3.0.tar.gz && cd fmt-5.3.0/ && ls -l \ - && cmake -j8 -DCMAKE_INSTALL_PREFIX=/usr . \ - && make install + && tar -xzf 5.3.0.tar.gz && cd fmt-5.3.0/ \ + && cmake -DCMAKE_INSTALL_PREFIX=/usr . \ + && make -j8 && make install \ + && cd ../ && rm -rf fmt* + +# libhttp-parser-dev is 2.1-2 which is too old +RUN echo "*** Building nodejs/http_parser dependency ***" \ + && wget https://github.com/nodejs/http-parser/archive/v2.9.2.tar.gz \ + && tar xvf v2.9.2.tar.gz && cd http-parser-2.9.2/ \ + && PREFIX=/usr make -j8 && make install \ + && cd ../ && rm -rf http-parser* + +# libaio (1.10.6-3) is too old +RUN echo "** Building a recent version of asio ***" \ + && wget https://github.com/chriskohlhoff/asio/archive/asio-1-12-2.tar.gz \ + && tar -xvf asio-1-12-2.tar.gz && cd asio-asio-1-12-2/asio \ + && ./autogen.sh && ./configure --prefix=/usr --without-boost \ + && make install \ + && cd ../../ && rm -rf asio* #patch for https://github.com/Stiffstream/restinio-conan-example/issues/2 -RUN apt-get update && apt-get install -y python3-pip \ - && pip3 install --upgrade cmake +RUN apt-get update && apt-get install -y python3-pip && pip3 install --upgrade cmake RUN echo "*** Downloading RESTinio ***" \ && mkdir restinio && cd restinio \ - && wget https://github.com/Stiffstream/restinio/archive/v.0.5.1.1.tar.gz \ - && ls -l && tar -xzf v.0.5.1.1.tar.gz \ - && cd restinio-v.0.5.1.1/dev \ + && wget https://github.com/Stiffstream/restinio/archive/v.0.5.1.2.tar.gz \ + && ls -l && tar -xzf v.0.5.1.2.tar.gz \ + && cd restinio-v.0.5.1.2/dev \ && cmake -DCMAKE_INSTALL_PREFIX=/usr -DRESTINIO_TEST=OFF -DRESTINIO_SAMPLE=OFF \ -DRESTINIO_INSTALL_SAMPLES=OFF -DRESTINIO_BENCH=OFF -DRESTINIO_INSTALL_BENCHES=OFF \ -DRESTINIO_FIND_DEPS=ON -DRESTINIO_ALLOW_SOBJECTIZER=Off -DRESTINIO_USE_BOOST_ASIO=none . \ + && make -j8 && make install \ && cd ../../ && rm -rf restinio* + # build restbed from sources RUN git clone --recursive https://github.com/corvusoft/restbed.git \ && cd restbed && mkdir build && cd build \ diff --git a/docker/DockerfileDepsLlvm b/docker/DockerfileDepsLlvm index 7cc53de7..6f044dcd 100644 --- a/docker/DockerfileDepsLlvm +++ b/docker/DockerfileDepsLlvm @@ -1,34 +1,49 @@ FROM ubuntu:16.04 MAINTAINER Adrien Béraud <adrien.beraud@savoirfairelinux.com> RUN apt-get update \ - && apt-get install -y llvm llvm-dev clang make cmake git wget libncurses5-dev libreadline-dev nettle-dev libgnutls28-dev libuv1-dev libmsgpack-dev libjsoncpp-dev libasio-dev cython3 python3-dev python3-setuptools libcppunit-dev python3-pip \ + && apt-get install -y llvm llvm-dev clang make cmake git wget libncurses5-dev libreadline-dev \ + nettle-dev libgnutls28-dev libuv1-dev libmsgpack-dev libjsoncpp-dev libasio-dev cython3 python3-dev \ + python3-setuptools libcppunit-dev python3-pip \ + autotools-dev autoconf libasio-dev \ && apt-get remove -y gcc g++ && apt-get autoremove -y && apt-get clean ENV CC cc ENV CXX c++ -RUN echo "*** Installing libssl, libasio & libhttp-parser ***" \ - && apt-get update && apt-get install -y libasio-dev libssl-dev libhttp-parser-dev \ - && apt-get clean - RUN echo "*** Installing libfmt ***" \ && wget https://github.com/fmtlib/fmt/archive/5.3.0.tar.gz \ - && tar -xzf 5.3.0.tar.gz && cd fmt-5.3.0/ && ls -l \ - && cmake -j8 -DCMAKE_INSTALL_PREFIX=/usr . \ - && make install + && tar -xzf 5.3.0.tar.gz && cd fmt-5.3.0/ \ + && cmake -DCMAKE_INSTALL_PREFIX=/usr . \ + && make -j8 && make install \ + && cd ../ && rm -rf fmt* + +# libhttp-parser-dev is 2.1-2 which is too old +RUN echo "*** Building nodejs/http_parser dependency ***" \ + && wget https://github.com/nodejs/http-parser/archive/v2.9.2.tar.gz \ + && tar xvf v2.9.2.tar.gz && cd http-parser-2.9.2/ \ + && PREFIX=/usr make -j8 && make install \ + && cd ../ && rm -rf http-parser* + +# libaio (1.10.6-3) is too old +RUN echo "** Building a recent version of asio ***" \ + && wget https://github.com/chriskohlhoff/asio/archive/asio-1-12-2.tar.gz \ + && tar -xvf asio-1-12-2.tar.gz && cd asio-asio-1-12-2/asio \ + && ./autogen.sh && ./configure --prefix=/usr --without-boost \ + && make install \ + && cd ../../ && rm -rf asio* #patch for https://github.com/Stiffstream/restinio-conan-example/issues/2 -RUN apt-get update && apt-get install -y python3-pip \ - && pip3 install --upgrade cmake +RUN apt-get update && apt-get install -y python3-pip && pip3 install --upgrade cmake RUN echo "*** Downloading RESTinio ***" \ && mkdir restinio && cd restinio \ - && wget https://github.com/Stiffstream/restinio/archive/v.0.5.1.1.tar.gz \ - && ls -l && tar -xzf v.0.5.1.1.tar.gz \ - && cd restinio-v.0.5.1.1/dev \ + && wget https://github.com/Stiffstream/restinio/archive/v.0.5.1.2.tar.gz \ + && ls -l && tar -xzf v.0.5.1.2.tar.gz \ + && cd restinio-v.0.5.1.2/dev \ && cmake -DCMAKE_INSTALL_PREFIX=/usr -DRESTINIO_TEST=OFF -DRESTINIO_SAMPLE=OFF \ -DRESTINIO_INSTALL_SAMPLES=OFF -DRESTINIO_BENCH=OFF -DRESTINIO_INSTALL_BENCHES=OFF \ -DRESTINIO_FIND_DEPS=ON -DRESTINIO_ALLOW_SOBJECTIZER=Off -DRESTINIO_USE_BOOST_ASIO=none . \ + && make -j8 && make install \ && cd ../../ && rm -rf restinio* # build restbed from sources -- GitLab