How to pass an argument to supervisord in docker?
You could use an environment variable: from supervisor doc
Environment variables that are present in the environment at the time that
supervisord
is started can be used in the configuration file using the Python string expression syntax%(ENV_X)s
:
[program:example]command=/usr/bin/example --loglevel=%(ENV_LOGLEVEL)s
In the example above, the expression
%(ENV_LOGLEVEL)s
would be expanded to the value of the environment variableLOGLEVEL
.
In your case, your common argument could be set in an environment variable passed to the container with a docker run -d -e "COMMON_ARG=myarg"
.