Well, that depends if there’s also an ENTRYPOINT
defined. From the documentation:
The main purpose of a CMD
is to provide defaults for an executing container. These defaults can include an executable, or they can omit the executable, in which case you must specify an ENTRYPOINT
instruction as well.
Be sure to read about the different CMD formats in the documentation. And make sure to read Understand how CMD and ENTRYPOINT interact. In those, you can interpret “Unlike the shell form, the exec form does not invoke a command shell” as: when using the shell form, and if no ENTRYPOINT
is defined, then Docker defaults to /bin/sh -c
.
Next, look at the source’s Dockerfile which ends with the following:
...
ENTRYPOINT ["/entrypoint.sh"]
CMD ["odoo"]
And the provided entrypoint.sh
which after some initialization parses its arguments as:
https://github.com/odoo/docker/blob/master/14.0/entrypoint.sh#L31-L47
This exposes that CMD
, which is passed as argument(s) to ENTRYPOINT
, could be --
or odoo
with optional additional 2nd, 3rd, …, Nth arguments, for which scaffold
as a 2nd argument would not wait for the database, and in both cases would just pass the 2nd, 3rd, … arguments to the odoo
command (using "$@"
). Or could be -anything
with a leading dash (the -*)
part), again with optional additional arguments, which would again be passed as arguments to the odoo
command. Or could be just anything
(the *
) catch all last option) which would simply be executed as is. All after the top parts of that entrypoint have completed.
In general, you’d just need some documentation rather than trying to decipher the scripts. Or just don’t specify anything to use the defaults from the base image.