Have you ever wonder to make dockerized modded minecraft, without manually download and migrate all mod files one by one, but unable to do so? Luckily, i succesfully experimented https://github.com/itzg/docker-minecraft-server with https://github.com/gorilla-devs/ferium, adjusting docker image, and found a setup that worked for me. Feel free to see the configuration and change it according to your needs.
You need to prepare:
- An empty 
filesfolder besidesdocker-compose.yaml. This folder acts as your world files - Download and install docker compose, make sure to able to run docker commands without root
 - Adjust server env as you seem fit, by editing 
docker-compose.yamlservices.mckey values following https://github.com/itzg/docker-minecraft-server docs (be careful when deleting or addingservices.mc.volumes, do not overridemodsfolder) 
After executing 3 setup steps above, do this:
- Edit 
mod_config.jsonby using ferium cli (make sure to only put ONLY directory name intooutput_dir) - To include mod profile into the installation, list down profile name from 
mod_config.jsontoservices.mc.build.args.INCLUDED_MODSin comma-separated value (ex:mod-1,mod-2,mod-3or ex:mod-1) - Clear cache and run 
docker compose build mc 
- Make sure 
filesfolder has correct ownership - (for Setup Option 2), Run 
docker compose build mcto build image and download the mods. If you want to update/modify mod list, clear cache and run this command again - Run 
docker compose up mcto initiate it 
Dockerfile-> command to download and setup modsdocker-compose.yamlcontains minecraft server setups and list of host folders included into the containermod_config.json-> ferium config. This can be modified with ferium cli