Open ericglau opened 3 years ago
Another workaround is to COPY the server.xml
located at target/liberty/wlp/usr/servers/defaultServer
in the Dockerfile instead of the server.xml
located in the src/main/liberty/config
folder.
I think the following is the reason for Liberty picking up the server configuration change before features are done installing and dev mode copies the src file to target:
When the Dockerfile contains a line to "COPY" the src file to target, the src file is then mounted to the target dir inside the container for devc. Whenever there is a change to the local src file, that same change is occurring inside the target dir on the container. This change inside the container's target dir triggers Liberty to update the server configuration immediately and not when dev mode eventually copies the file from src to target.
Using the latest SNAPSHOT of liberty-maven-plugin,
coffee-shop
folder from https://github.com/sdaschner/coffee-testing/tree/liberty-devFROM openliberty/open-liberty:kernel-slim-java15-openj9-ubi
RUN features.sh
at the bottom of the file<feature>mpHealth-2.0</feature>
from server.xmlmvn liberty:devc
<feature>mpHealth-2.0</feature>
to server.xmlThe workaround is to use the
full
image instead ofkernel-slim
Original error below: