Open TrevCraw opened 3 years ago
The above PR resolved the issue on Mac but it still restarts (only) twice on Windows.
A workaround is to use -DpollingTest
when starting dev mode.
This does not occur with the Dockerfile in our example https://github.com/OpenLiberty/demo-devmode/blob/devc/Dockerfile . It does occur if the Dockerfile has COPY commands for entire directories though.
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. 1) Start with the default demo devmode Dockerfile
2) 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.3) 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).