Compress PNG images during Docker build
To minimize the size of the Docker images, we need to compress the PNG images, which are the biggest source of adding to the size.
Closes #368 (closed)
Tested with 12.0:
git checkout compress-img
docker build -t registry.gitlab.com/gitlab-com/gitlab-docs:bootstrap -f dockerfiles/Dockerfile.bootstrap .
docker build -t registry.gitlab.com/gitlab-com/gitlab-docs:builder-onbuild -f dockerfiles/Dockerfile.builder.onbuild .
git checkout 12.0
docker build --build-arg NANOC_ENV=production --build-arg CI_COMMIT_REF_NAME=12.0 -t gitlab-docs:12.0 -f Dockerfile.12.0 .
- Before: 112.81 MiB
- After: 102.38 MiB
We'll need to backport those changes to the branches we want.