Currently, building the nuxeo/nuxeo image takes a long time if the server ZIP has been rebuilt locally.
This is because we're relying on 2 images:
- nuxeo/slim: base image including CentOS, JDK, Nuxeo server
- nuxeo/nuxeo: based on nuxeo/slim, adding some software such as ImageMagick, LibreOffice, ghostscript, etc.
When rebuilding a server ZIP, to have a fresh nuxeo/nuxeo image, we need to:
- Rebuild nuxeo/slim: here the Docker cache works fine since only the steps copying the server ZIP are invalidated.
- Rebuild nuxeo/nuxeo: since the base image has changed, the whole step running yum update && yum install... to install the converters gets invalidated, thus replayed, which is overkill.
We should better rely on the Docker layer cache system and:
- Get rid of the nuxeo/slim image: the initial goal was to have an image without the converters, but in fact, everyday usage shows that it is a pain to have an image without the converters since the server keeps complaining about them in the logs.
- Have a single image where all the OS packages are installed within the same yum install command and the server ZIP is copied at then end of the Dockerfile.
This way, building this single nuxeo/nuxeo image will be fast no matter if the server ZIP has been rebuilt locally.