diff --git a/Dockerfile b/Dockerfile index 2b06cbf71cfccafa8a9046e2cabc9352a6093a4a..4008a982706d5579a2a1f1563495947d86344a3b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,15 @@ FROM debian:latest -RUN apt-get update && -apt-get install build-essential cmake libcurlpp-dev git ibjsoncpp-dev +RUN apt-get update \ +&& apt-get install apt-transport-https \ + ca-certificates \ + curl \ + gnupg2 \ + software-properties-common -y + +RUN apt-get install \ + sudo \ + build-essential cmake libcurl4-gnutls-dev git libjsoncpp-dev \ g++ \ automake \ autoconf \ @@ -20,27 +28,44 @@ apt-get install build-essential cmake libcurlpp-dev git ibjsoncpp-dev binutils-dev \ libjemalloc-dev \ libssl-dev \ - pkg-config -y && -mkdir /proxygenSrc && cd /proxygenSrc && -git clone https://github.com/facebook/proxygen.git && -cd proxygen && -https://github.com/facebook/folly.git && -cd folly && -autoreconf -ivf && -./configure && -make march=native && -make check && -make install && -cd .. && -cd proxygen && -./deps.sh && -./reinstall.sh && -mkdir /pushGateway && -cd /pushGateway && -git clone https://git.fairkom.net/chat/RocketChatMobilePushGateway.git && -cd RocketChatMobilePushGateway && -cmake . && -make march=native&& -./rocketChatMobilePushGateway + pkg-config -y \ + wget + +RUN mkdir /proxygenSrc && cd /proxygenSrc \ + && git clone https://github.com/facebook/proxygen.git + + +RUN cd /proxygenSrc/proxygen \ +&& git clone https://github.com/facebook/folly.git + +RUN cd /proxygenSrc/proxygen/folly/folly/test \ +&& rm -rf gtest \ +&& wget https://github.com/google/googletest/archive/release-1.8.0.tar.gz \ +&& tar zxf release-1.8.0.tar.gz \ +&& rm -f release-1.8.0.tar.gz \ +&& mv googletest-release-1.8.0 gtest + +ENV CXXFLAGS "$CXXFLAGS -march=native" +ENV CFLAGS "$CFLAGS -march=native" +ENV MAKEFLAGS="-j$[$(nproc) + 1]" + +RUN cd /proxygenSrc/proxygen/folly/folly \ + && autoreconf -ivf \ + && ./configure \ + && make \ + && make install \ + && cd .. + +RUN cd /proxygenSrc/proxygen/proxygen \ +&& ./deps.sh \ +&& ./reinstall.sh + +RUN mkdir /pushGateway \ +&& cd /pushGateway \ +&& git clone https://git.fairkom.net/chat/RocketChatMobilePushGateway.git \ +&& cd RocketChatMobilePushGateway \ +&& cmake . \ +&& make \ +&& ./rocketChatMobilePushGateway EXPOSE 11000