Use pngcrush from package manager
authorRafael dos Santos Silva <xfalcox@gmail.com>
Wed, 27 Jan 2021 17:13:56 +0000 (14:13 -0300)
committerRafael dos Santos Silva <xfalcox@gmail.com>
Wed, 27 Jan 2021 18:27:41 +0000 (15:27 -0300)
image/base/Dockerfile
image/base/install-pngcrush [deleted file]

index 6f3d5a8438ffbbdb3f8c95888b255e8e9c3cbea0..f047d5e92385deaa998037a9882d7bf1941d20cb 100644 (file)
@@ -39,7 +39,8 @@ RUN apt -y install build-essential rsync \
                        postgresql-contrib-${PG_MAJOR} libpq-dev libreadline-dev \
                        anacron wget \
                        psmisc vim whois brotli libunwind-dev \
-                       libtcmalloc-minimal4 cmake
+                       libtcmalloc-minimal4 cmake \
+                       pngcrush
 RUN sed -i -e 's/start -q anacron/anacron -s/' /etc/cron.d/anacron
 RUN sed -i.bak 's/$ModLoad imklog/#$ModLoad imklog/' /etc/rsyslog.conf
 RUN sed -i.bak 's/module(load="imklog")/#module(load="imklog")/' /etc/rsyslog.conf
@@ -90,9 +91,6 @@ RUN /tmp/install-imagemagick
 # Validate install
 RUN ruby -Eutf-8 -e "v = \`convert -version\`; %w{png tiff jpeg freetype heic}.each { |f| unless v.include?(f); STDERR.puts('no ' + f +  ' support in imagemagick'); exit(-1); end }"
 
-ADD install-pngcrush /tmp/install-pngcrush
-RUN /tmp/install-pngcrush
-
 ADD install-pngquant /tmp/install-pngquant
 RUN /tmp/install-pngquant
 
diff --git a/image/base/install-pngcrush b/image/base/install-pngcrush
deleted file mode 100755 (executable)
index 40b8349..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/bash
-set -e
-
-# version check: https://sourceforge.net/projects/pmt/files/pngcrush/
-PNGCRUSH_VERSION=1.8.13
-PNGCRUSH_HASH="bac37d4b2be88d7e88aadcde9661beb3a513a90e7d26784f906c1e2da8ba332e"
-
-cd /tmp
-wget https://sourceforge.net/projects/pmt/files/pngcrush/$PNGCRUSH_VERSION/pngcrush-$PNGCRUSH_VERSION.tar.gz/download -O pngcrush-$PNGCRUSH_VERSION.tar.gz
-sha256sum pngcrush-$PNGCRUSH_VERSION.tar.gz
-echo "$PNGCRUSH_HASH pngcrush-$PNGCRUSH_VERSION.tar.gz" | sha256sum -c
-
-tar zxf pngcrush-$PNGCRUSH_VERSION.tar.gz
-cd pngcrush-$PNGCRUSH_VERSION
-make && cp -f pngcrush /usr/local/bin
-cd /
-rm -fr /tmp/pngcrush-$PNGCRUSH_VERSION
-rm /tmp/pngcrush-$PNGCRUSH_VERSION.tar.gz