Allow services to override image CMD while preserving ENTRYPOINT
Many OCI images provide a stable executable in ENTRYPOINT and expect deployment-specific arguments through CMD. Miren currently lets a service either accept both unchanged or set command, which replaces the complete image startup contract with /bin/sh -c.
Add an exec-form args field:
[services.web]
image = "nousresearch/hermes-agent:latest"
args = ["gateway", "run"]
port = 9119
Behavior:
- With neither
commandnorargs, run the image’sENTRYPOINT + CMDunchanged. - With nonempty
args, preserve the image’sENTRYPOINTand replace itsCMDwith the supplied argv. - With
command, retain the existing/bin/sh -cfull override. - Reject services that specify both
commandandargs. - Do not perform shell expansion or flatten the arguments into a string.
Containerd already provides this behavior through oci.WithImageConfigArgs. Carry the list through app config, version config, sandbox specs, and launch.
Done when:
argsround-trips through the service configuration pipeline.- Container startup preserves argv boundaries and the image entrypoint.
- Validation rejects an empty
argslist and thecommand/argscombination. - A regression test covers an image with both
ENTRYPOINTand a defaultCMD. - The Hermes recipe can use
args = ["gateway", "run"]without reconstructing the image entrypoint.