diff options
author | Achilleas Pipinellis <axil@gitlab.com> | 2019-06-24 20:21:08 +0300 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2019-06-24 20:21:08 +0300 |
commit | b4c532e2a3bd05316381ac914c175df66a9ecb68 (patch) | |
tree | da49b6b7876394e1ba9aeafcf397f9cf7601ea13 /dockerfiles | |
parent | 7e701518da02827f18d373c104aa91829eb67877 (diff) | |
parent | 69690954a4ba52af68ee7a40b61a75746160d466 (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.bootstrap | 2 | ||||
-rw-r--r-- | dockerfiles/Dockerfile.builder.onbuild | 3 |
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 |