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

Enhance APPLY_EXTRA_FILES to copy source directories recursively

Open itzg opened this issue 2 months ago • 1 comments

Discussed in Discord

itzg avatar Nov 05 '25 23:11 itzg

This feature works well to add a directory of extra config files into the plugins or mods directory. However this is not a recursive copy, meaning that this feature does not work well with copying plugin config files that are nested in multiple directory levels.

Currently to support copying configs for multiple different mods and plugins you have to manually define every config file through the APPLY_EXTRA_FILES env var.

Virtually all mod and plugin configs would require going into at least one subdirectory (the plugin name). Even if you wanted to just to apply both luckperms and via version config you would have to supply two APPLY_EXTRA_FILES entries as they do not share the same parent directory. This becomes tedious to maintain if you have a lot of config files.

Recursion should continue for a reasonable number iterations or be uncapped as some plugins such as world guard contain multiple directories of config files.

hub/plugins/WorldGuard/
├── cache
│   └── profiles.sqlite
├── config.yml
└── worlds
    ├── hub
    │   ├── blacklist.txt
    │   ├── config.yml
    │   └── regions.yml
    ├── hub_nether
    │   ├── blacklist.txt
    │   └── config.yml
    └── hub_the_end
        ├── blacklist.txt
        └── config.yml

runningbird2 avatar Nov 08 '25 12:11 runningbird2