From 536ca9ddf59e0dc1ec69374eac199820718b0a31 Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 20 May 2016 18:13:37 +1000 Subject: [PATCH] slim down image, upgrade image magick and libpng --- image/base/Dockerfile | 21 ++++++++++++++++++--- image/base/install-imagemagick | 4 ++-- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/image/base/Dockerfile b/image/base/Dockerfile index 82fce74..499da34 100644 --- a/image/base/Dockerfile +++ b/image/base/Dockerfile @@ -48,7 +48,8 @@ RUN cd / &&\ 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 +RUN apt-get -y install advancecomp jhead jpegoptim libjpeg-turbo-progs optipng + # consider upgrading this RUN mkdir /jemalloc && cd /jemalloc &&\ @@ -75,11 +76,25 @@ RUN echo 'gem: --no-document' >> /usr/local/etc/gemrc &&\ RUN gem update --system &&\ gem install bundler &&\ - rm -rf /usr/local/share/ri/2.3.1/system &&\ + rm -rf /usr/local/share/ri/2.3.0/system &&\ cd / && git clone https://github.com/SamSaffron/pups.git # clean up for docker squash -RUN rm -fr /usr/share/man && rm -fr /usr/share/doc && mkdir -p /etc/runit/3.d +RUN rm -fr /usr/share/man &&\ + rm -fr /usr/share/doc &&\ + rm -fr /usr/share/vim/vim74/tutor &&\ + rm -fr /usr/share/vim/vim74/doc &&\ + rm -fr /usr/share/vim/vim74/lang &&\ + rm -fr /usr/local/share/doc &&\ + rm -fr /usr/local/share/ruby-build &&\ + rm -fr /root/.gem &&\ + rm -fr /root/.npm + +# this can probably be done, but I worry that people changing PG locales will have issues +# cd /usr/share/locale && rm -fr `ls -d */ | grep -v en` + + +RUN mkdir -p /etc/runit/3.d ADD runit-1 /etc/runit/1 ADD runit-1.d-cleanup-pids /etc/runit/1.d/cleanup-pids diff --git a/image/base/install-imagemagick b/image/base/install-imagemagick index f28c03d..3c8c77e 100755 --- a/image/base/install-imagemagick +++ b/image/base/install-imagemagick @@ -10,14 +10,14 @@ WDIR=/tmp/imagemagick mkdir -p $WDIR # Build and install libpng -git clone -b v1.6.19 git://git.code.sf.net/p/libpng/code $WDIR/libpng +git clone -b v1.6.21 git://git.code.sf.net/p/libpng/code $WDIR/libpng cd $WDIR/libpng ./autogen.sh ./configure --prefix=$PREFIX make all && make install # Build and install ImageMagick -wget -O $WDIR/ImageMagick.tar.gz "http://www.imagemagick.org/download/ImageMagick-6.9.4-1.tar.gz" +wget -O $WDIR/ImageMagick.tar.gz "http://www.imagemagick.org/download/ImageMagick-6.9.4-3.tar.gz" IMDIR=$WDIR/$(tar tzf $WDIR/ImageMagick.tar.gz --wildcards "ImageMagick-*/configure" |cut -d/ -f1) tar zxf $WDIR/ImageMagick.tar.gz -C $WDIR cd $IMDIR -- 2.25.1