Description
Modifying or adding lines in the Dockerfile triggers multiple restarts while running devc.
On Mac, it appears to only ever restart twice max.
On Windows, it seems that the number of restarts after a Dockerfile change increases after each successive change (ie. 4 restarts, then 6, then 10). It could also be related to the content that was changed in the Dockerfile.
The steps below are just an example of what can be changed in the Dockerfile to recreate the issue. It should be reproducible no matter what modification is made to the Dockerfile.
- Start with the default demo devmode Dockerfile
FROM openliberty/open-liberty:kernel-java8-openj9-ubi
# Add config
COPY --chown=1001:0 target/liberty/wlp/usr/servers/defaultServer/server.xml /config/
COPY --chown=1001:0 target/liberty/wlp/usr/servers/defaultServer/bootstrap.properties /config/
COPY --chown=1001:0 target/liberty/wlp/usr/servers/defaultServer/configDropins/overrides/liberty-plugin-variable-config.xml /config/configDropins/overrides/
# Add application
COPY --chown=1001:0 target/liberty/wlp/usr/servers/defaultServer/apps/demo-devmode-maven.war /config/apps/
- Comment out or remove the first three COPY lines and add
COPY --chown=1001:0 target/liberty/wlp/usr/servers/defaultServer /config
. Save the Dockerfile and multiple restarts should be triggered.
FROM openliberty/open-liberty:kernel-java8-openj9-ubi
# Add config
COPY --chown=1001:0 target/liberty/wlp/usr/servers/defaultServer /config
# Add application
COPY --chown=1001:0 target/liberty/wlp/usr/servers/defaultServer/apps/demo-devmode-maven.war /config/apps/
- Add a new COPY line (create a new file if you need to):
COPY src/testFile.txt /config/apps/testFile.txt
. Save the Dockerfile and multiple restarts should be triggered (more than before if on Windows).
FROM openliberty/open-liberty:kernel-java8-openj9-ubi
# Add config
COPY --chown=1001:0 target/liberty/wlp/usr/servers/defaultServer /config
COPY --chown=1001:0 src/testFile.txt /configDropins/overrides/testFile.txt
# Add application
COPY --chown=1001:0 target/liberty/wlp/usr/servers/defaultServer/apps/demo-devmode-maven.war /config/apps/
Metadata
Metadata
Assignees
Type
Projects
Status
New Issues