factoriotools / factorio-docker

Factorio headless server in a Docker container
https://hub.docker.com/r/factoriotools/factorio/
MIT License
1.08k stars 243 forks source link

Add documentation for env variable MODS and make it change mod directory #520

Closed ybeauchamph closed 1 month ago

ybeauchamph commented 1 month ago

Description

Pass the MODS environment variable to the Factorio executable with the argument --mod-directory
This make it possible to change the mod directory by only changing the variable.

Context

The recent change for version 2.0.9 introduced a script to enable/disable Space Age mods. This broke my setup because I was using the argument --mod-directory to use a different folder. The script docker-dlc.sh couldn't find any mod-list.json file.

As a workaround without this change, it's possible to set the MODS variable and also set the --mod-directory argument. With this change, only the setting the MODS variable is required.

Fank commented 1 month ago

Thanks this is a nice addition