I have a problem with my application using JavaEE8, Openliberty 184.108.40.206 and Microprofile 4.0 inside a docker container.
I cannot set the mpConfig-2.0-introduced
mp.config.profile from "outside" the image.
My setup is as follows:
microprofile-config.properties microprofile-config-dev.properties microprofile-config-prod.properties
Features are correctly activated inside server.xml and are installed correctly on startup.
<featureManager onError="WARN"> <feature>microProfile-4.0</feature> <feature>javaee-8.0</feature> </featureManager>
I also have one server.env per stage that is passed to my container via docker run’s
My first approach was to set
mp.config.profile inside the
server.env since it can be
changed when running the image on different stages.
server-dev.env an so forth.
However the values of microprofile-config-dev.properties are never used with this setup.
The only way I was able to correctly activate the config profile was when using
<variable name="mp.config.profile" value="dev" />
server.xml is not stage-specific inside the docker image, so it won’t be possible to change it on different stages.
Does anyone have a suggestions what is the correct way to do this?
Thanks in advance
Source: Docker Questions