| Description | Docker field name | Kubernetes field name |
|---|---|---|
| The command run by the container | Entrypoint | command |
| The arguments passed to the command | Cmd | args |
- 如果不为容器提供
command或args参数,则使用Docker镜像中定义的默认值。 - 如果提供
command但没有提供args参数,则仅使用提供的command。Docker镜像中定义的默认EntryPoint和默认Cmd将被忽略。 - 如果仅为容器提供
args,则Docker镜像中定义的默认Entrypoint将与您提供的args一起运行。 - 如果提供
command和args,则将忽略Docker镜像中定义的默认Entrypoint和默认Cmd。 您的command与args一起运行。