Reduce the size of customized MDM docker image using multi-stage builds
The MDM container has Installation Manager, WAS Base, a Profile, MDM and certain utilities such as DB drivers to connect to the database in it. For the MDM container to function, it is sufficient if the WAS Base installation along with the profile and the database driver(s) are available in the container. In addition, we can have the IVT folder under MDM to enable us to confirm that the product is functional. Incase the Business Administration UI is part of the container, certain jars under a folder in MDM also need to be included. We can reduce the size of the runtime image that can be used in container orchestration systems like Kubernetes and OpenShift, by creating a new image having only the required files and folders. To achieve this, we can use Docker multi-stage builds. Below is a sample script: FROM <CUSTOMIZED_MDM_IMAGE> AS MDM FROM us.icr.io/mdmaese/ubuntu-18.0.4-ossc ENV JAVA_HOME=/opt/IBM/WebSphere/A...