Change a containers CMD via the fly.toml file

There is a build.args section for setting build arguments (fly.io/docs/reference/configuration), but how can I change the CMD to execute in the container?

You can set this:

app = "your-app"

[experimental]
cmd = ["path/to/command", "arg1", "arg2"]
1 Like

Added a PR to update documentation: Add `cmd` section to experimental by jbergstroem · Pull Request #25 · superfly/docs · GitHub

1 Like

Thinking about it, I think the new preferred way to do this would be using the new Preview: multi process apps (get your workers here!).

Something like:

app = "your-app"

[processes]
app = "path/to/command arg1 arg2"

By default, an app process will be infered if you don’t have one.