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
files
folder 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.yaml
services.mc
key values following https://github.com/itzg/docker-minecraft-server docs (be careful when deleting or addingservices.mc.volumes
, do not overridemods
folder)
After executing 3 setup steps above, do this:
- Edit
mod_config.json
by 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.json
toservices.mc.build.args.INCLUDED_MODS
in comma-separated value (ex:mod-1,mod-2,mod-3
or ex:mod-1
) - Clear cache and run
docker compose build mc
- Make sure
files
folder has correct ownership - (for Setup Option 2), Run
docker compose build mc
to 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 mc
to initiate it
Dockerfile
-> command to download and setup modsdocker-compose.yaml
contains minecraft server setups and list of host folders included into the containermod_config.json
-> ferium config. This can be modified with ferium cli