diff --git a/docker/DockerfileDeps b/docker/DockerfileDeps index 5249332114b4427acc80eb8876b87d613ac0a40f..7ed0f2a832ac4c2a15b62858f6090d9c9edc1e7a 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 7cc53de782162724f1b677e9bca6857634e716ef..6f044dcde857128ff6b4f567b26ae9987216ce04 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