Use jobs.<job_id>.steps[*].with.args
to define the inputs for a step that executes a Docker container.
args
specifications:
-
Enter the
args
parameter as Unicode strings. -
An array of strings is not supported.
-
Any argument containing spaces must be surrounded by double quotes (
""
). -
CloudBees passes all
args
to theENTRYPOINT
of the Docker container when the container starts up.
The main purpose of CMD
in a Dockerfile is to provide defaults for an executing container.
Instead, you can provide this instruction by defining args
in your job.
If you do use CMD
in your Dockerfile
, you must use one of the following workflow guidelines:
-
(Recommended) delete any required arguments from
CMD
. -
Define appropriate defaults so that you can run without specifying any arguments.
-
If a
--help
flag, or something similar is available, use that as the default for documentation.