From 9b63e854261ff1a65ae641ac98fe5a07391bd781 Mon Sep 17 00:00:00 2001
From: Pierre Ozoux <pierre@ozoux.net>
Date: Thu, 2 Sep 2021 16:45:55 +0200
Subject: [PATCH] Use pngcrush from package manager.

---
 Dockerfile       | 2 +-
 install/pngcrush | 9 ---------
 2 files changed, 1 insertion(+), 10 deletions(-)
 delete mode 100755 install/pngcrush

diff --git a/Dockerfile b/Dockerfile
index a8a23ad..bccade9 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -48,6 +48,7 @@ RUN curl http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | apt-key add - \
       nodejs \
       optipng \
       jhead \
+      pngcrush \
       pngquant \
       postgresql-client-${PG_MAJOR} \
       postgresql-contrib-${PG_MAJOR} libpq-dev libreadline-dev \
@@ -66,7 +67,6 @@ RUN curl http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | apt-key add - \
  && /tmp/install/imagemagick \
  # Validate install
  && ruby -Eutf-8 -e "v = \`convert -version\`; %w{png tiff jpeg freetype}.each { |f| unless v.include?(f); STDERR.puts('no ' + f +  ' support in imagemagick'); exit(-1); end }" \
- && /tmp/install/pngcrush \
  && addgroup --gid 1000 discourse \
  && adduser --system --uid 1000 --ingroup discourse --shell /bin/bash discourse \
  && cd /home/discourse \
diff --git a/install/pngcrush b/install/pngcrush
deleted file mode 100755
index 5d1b72b..0000000
--- a/install/pngcrush
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash -e
-cd /tmp
-wget https://sourceforge.net/projects/pmt/files/pngcrush/$PNGCRUSH_VERSION/pngcrush-$PNGCRUSH_VERSION.tar.gz/download -O pngcrush-$PNGCRUSH_VERSION.tar.gz
-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
-- 
GitLab