Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker: pass on parameters such as --autostart true to the fsm process #413

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Leridon
Copy link

@Leridon Leridon commented Oct 23, 2024

What's wrong?

While investigating #409 I found an issue with the docker packaging of fsm:

As it stands currently, all command line parameters meant for the fsm process passed when starting a container (with docker run or any other method) are ignored because entrypoint.sh does not actually pass them to the process. This is noticeable when trying to use --autostart true for example.

The fix

The change to fix this is tiny: The parameters are forwarded to fsm by appending "$@" to the command that starts factorio-server-manager.

When supplying parameters that are already included in the command (--conf, --dir and --port), the manually supplied parameters override the included ones, which seems like reasonable behaviour to me. If this is not desired, the "$@" can be moved to the left so the default arguments take precedence.

Impact

This change does not affect the fsm code itself, but can help to mitigate various issues regarding autostart (see #409, #362, #301). The Dockerfile pulls the current release for packaging directly from the GitHub releases, so even if the current state of the development branch is not release-ready, this fix can quickly be distributed by updating the image on Docker Hub. Please consider doing so as soon as it's convenient. Thank you!

@Mattie112
Copy link
Contributor

Mattie112 commented Oct 26, 2024

@knoxfighter I can confirm that this works (even though you might prefer the "normal" autostart to work this does give a quick/easy way to add arguments to factorio.

edit: to confirm, this DOES work on master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants