docker-minecraft-server icon indicating copy to clipboard operation
docker-minecraft-server copied to clipboard

[enchancement] would be great if patches were applied after a full launch

Open ultard opened this issue 1 year ago • 3 comments

It would be great if patches were applied after a full launch, so you could change for example paper-global.yml to link server with proxy.

ultard avatar Dec 02 '23 18:12 ultard

Either I don't understand how to apply these patches, need more examples of how to do it correctly.

ultard avatar Dec 02 '23 19:12 ultard

This is a reasonable request however it is actually quite difficult to implement. The image startup script exec's off to mc-server-runner which runs the server java process and intercepts exit signals. It's that java server process, such as Paper, that initially creates the stock config files.

So, it would mostly involve an enhancement to mc-server-runner to add health check logic, check when the java server process is fully up and running, stop the server/container, and allow the container startup script to re-run with the patch invocation. And it needs to only do that the first time.

itzg avatar Dec 02 '23 19:12 itzg

BTW, if you haven't seen it already, here is the docs section with an example

https://docker-minecraft-server.readthedocs.io/en/latest/configuration/interpolating/#patching-existing-files

One solution, to avoid the chicken-and-egg problem, is to make use of the /config mount point by placing the initial file there, let the container startup copy it over, patch it, and proceed on with the first startup.

itzg avatar Dec 02 '23 19:12 itzg