diff --git a/Dockerfile b/Dockerfile
index 88c6445d46708e434eb9d82b560588e46237af6b..65019dcaf9f938841c696e1afa47552e7a2b6c71 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -32,13 +32,13 @@ RUN addgroup --gid 1000 discourse \
  && curl --silent --location https://deb.nodesource.com/setup_8.x | bash - \
  && apt-get update && apt-get install -y --no-install-recommends \
       ${BUILD_DEPS} \
+      ghostscript \
+      gsfonts \
+      imagemagick \
       jpegoptim \
       libxml2 \
       nodejs \
       optipng \
-      ghostscript \
-      gsfonts \
-      imagemagick \
  && npm install svgo uglify-js@"<3" -g \
  && cd /tmp \
  && curl -O http://www.lcdf.org/gifsicle/gifsicle-$GIFSICLE_VERSION.tar.gz \