Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAchilleas Pipinellis <axil@gitlab.com>2019-06-24 20:21:08 +0300
committerAchilleas Pipinellis <axil@gitlab.com>2019-06-24 20:21:08 +0300
commitb4c532e2a3bd05316381ac914c175df66a9ecb68 (patch)
treeda49b6b7876394e1ba9aeafcf397f9cf7601ea13 /dockerfiles
parent7e701518da02827f18d373c104aa91829eb67877 (diff)
parent69690954a4ba52af68ee7a40b61a75746160d466 (diff)
Merge branch 'compress-img' into 'master'
Compress PNG images during Docker build Closes #368 See merge request gitlab-com/gitlab-docs!478
Diffstat (limited to 'dockerfiles')
-rw-r--r--dockerfiles/Dockerfile.bootstrap2
-rw-r--r--dockerfiles/Dockerfile.builder.onbuild3
2 files changed, 4 insertions, 1 deletions
diff --git a/dockerfiles/Dockerfile.bootstrap b/dockerfiles/Dockerfile.bootstrap
index 63a5b6e2..fc9b5359 100644
--- a/dockerfiles/Dockerfile.bootstrap
+++ b/dockerfiles/Dockerfile.bootstrap
@@ -25,6 +25,6 @@ WORKDIR /source
RUN NOKOGIRI_USE_SYSTEM_LIBRARIES=1 bundle install --jobs 4
# Install packages needed at build and run time
-RUN apk add --no-cache libxslt libcurl openssl git grep bash
+RUN apk add --no-cache libxslt libcurl openssl git grep bash pngquant
CMD echo "Nothing to do here. This is the bootstrap image that contains all dependencies to build the docs site."
diff --git a/dockerfiles/Dockerfile.builder.onbuild b/dockerfiles/Dockerfile.builder.onbuild
index f768892b..30934883 100644
--- a/dockerfiles/Dockerfile.builder.onbuild
+++ b/dockerfiles/Dockerfile.builder.onbuild
@@ -26,6 +26,9 @@ ONBUILD RUN rm -rf /source/tmp
# Do some HTML post-processing on the archive
ONBUILD RUN /scripts/normalize-links.sh /site ${VER}
+# Compress images
+ONBUILD RUN /scripts/compress_images.sh /site ${VER}
+
# Make an index.html and 404.html which will redirect / to /${VER}/
ONBUILD RUN echo "<html><head><title>Redirect for ${VER}</title><meta http-equiv=\"refresh\" content=\"0;url='/${VER}/'\" /></head><body><p>If you are not redirected automatically, click <a href=\"/${VER}/\">here</a>.</p></body></html>" > /site/index.html
ONBUILD RUN echo "<html><head><title>Redirect for ${VER}</title><meta http-equiv=\"refresh\" content=\"0;url='/${VER}/'\" /></head><body><p>If you are not redirected automatically, click <a href=\"/${VER}/\">here</a>.</p></body></html>" > /site/404.html