- apt-get install -y nodejs &&\
- npm install uglify-js -g &&\
- npm install svgo -g
-RUN apt-get -y install advancecomp jhead jpegoptim libjpeg-turbo-progs optipng phantomjs
+ apt install -y nodejs &&\
+ npm install -g uglify-js &&\
+ npm install -g svgo
+
+ADD install-nginx /tmp/install-nginx
+RUN /tmp/install-nginx
+
+RUN apt -y install advancecomp jhead jpegoptim libjpeg-turbo-progs optipng
+
+RUN mkdir /jemalloc-stable && cd /jemalloc-stable &&\
+ wget https://github.com/jemalloc/jemalloc/releases/download/3.6.0/jemalloc-3.6.0.tar.bz2 &&\
+ tar -xjf jemalloc-3.6.0.tar.bz2 && cd jemalloc-3.6.0 && ./configure --prefix=/usr && make && make install &&\
+ cd / && rm -rf /jemalloc-stable
+
+RUN mkdir /jemalloc-new && cd /jemalloc-new &&\
+ wget https://github.com/jemalloc/jemalloc/releases/download/5.2.0/jemalloc-5.2.0.tar.bz2 &&\
+ tar -xjf jemalloc-5.2.0.tar.bz2 && cd jemalloc-5.2.0 && ./configure --prefix=/usr --with-install-suffix=5.1.0 && make build_lib && make install_lib &&\
+ cd / && rm -rf /jemalloc-new
+
+RUN echo 'gem: --no-document' >> /usr/local/etc/gemrc &&\
+ mkdir /src && cd /src && git clone https://github.com/sstephenson/ruby-build.git &&\
+ cd /src/ruby-build && ./install.sh &&\
+ cd / && rm -rf /src/ruby-build && (ruby-build 2.6.5 /usr/local)