KodeCloud CKAD Commands and Arguments
Links: 111 KodeCloud Index
Commands & Arguments¶
- In case of
ENTRYPOINT
in docker whateverCMD
you specify, it will get appended toENTRYPOINT
command. -
In case of
CMD
the command line instruction will get replaced entirely whereas in case ofENTRYPOINT
the command line parameters will get appended. -
Pod definition with
ENTRYPOINT
andCMD
In the above example command
is equivalent to the ENTRYPOINT
instruction in the Dockerfile
and the args
is equivalent to the CMD
instruction
-
The
commands
andargs
must be in quotes. -
In general I have only seen the use of command and not args in a definition file.
-
Questions: Find the command being run assuming the pod is created from the image of Dockerfile.
- Question 1:
python app.py --color pink
- Question 2:
--color green
- Question 1:
Basically command
overrides the entrypoint
of Dockerfile
- Commands is an array so they can also be given in the following way
Last updated: 2023-05-03