Need advice on how to layer images together for Mule

I’ll try to keep this concise, but there are several nuances to this, so bear with me. For anyone not familiar with Mule, it is a Java based platform on which to develop and run applications and APIs. I know one school of thought for deploying Mule in containers would be to deploy each application with its own instance of the Mule engine, but that isn’t what I’m doing at this point for reasons that I won’t get into here.

For a traditional deployment you would install JRE, Mule Engine, modify some local XML configs, run a command to install your license file, and then run a specialized command to “register” the server with the Mule management platform. It is this last step I need some help with because it is a persistent binding to a logical system.

Originally I built a base muleengine image so I could maintain its standard characteristics. Then I built an image FROM muleengine, adding a RUN statement to handle the server registration to the Mule management platform. That registration command looks something like this:
./amc_setup – H [special UUID] [servername]

This special UUID changes periodically. Also once you register a server by a given name, you cannot register a server with that name again. Registering the server puts some certificate on the server that identifies it and links it to the management platform.

Since the registration happens once, but I had the underlying base image created, I thought this would allow me to make changes to the underlying image while still having a persistent image that effectively represents a specific server identity. Unfortunately, it didn’t work this way and in order to incorporate changes into the higher level image, I have to do run a build command on it, which then means I need to get a new special UUID and delete the old server so it can be re-added.

Has anyone had any experience working with a similar application or requirement? Is there a good way to layer images in such a way to let me maintain a single image for the core config along with the unique server identity based on the constraints above? I’m open to any ideas or suggestions.

Hi
I wondered if you got very far with this?

We are facing a similar problem and would appreciate any advice you can give.

Cheers
Dave