From 0c71c314fa18796bb61c8926ca49edf3a01b6830 Mon Sep 17 00:00:00 2001 From: Yong Tang Date: Fri, 5 Aug 2016 15:00:41 -0700 Subject: [PATCH] Update documentation for entrypoint unset with `docker run/create` Signed-off-by: Yong Tang Upstream-commit: 26c913cb6054236e2df5b4a1fcdc5708c4be8f4c Component: engine --- .../engine/docs/reference/api/docker_remote_api_v1.25.md | 4 +++- components/engine/docs/reference/run.md | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/components/engine/docs/reference/api/docker_remote_api_v1.25.md b/components/engine/docs/reference/api/docker_remote_api_v1.25.md index b83ce68cdf..aabd1d06d6 100644 --- a/components/engine/docs/reference/api/docker_remote_api_v1.25.md +++ b/components/engine/docs/reference/api/docker_remote_api_v1.25.md @@ -377,7 +377,9 @@ Create a container - **Labels** - Adds a map of labels to a container. To specify a map: `{"key":"value"[,"key2":"value2"]}` - **Cmd** - Command to run specified as a string or an array of strings. - **Entrypoint** - Set the entry point for the container as a string or an array - of strings. + of strings. If the array consists of exactly one empty string (`[""]`) then the entry point + is reset to system default (i.e., the entry point used by docker when there is no `ENTRYPOINT` + instruction in the Dockerfile). - **Image** - A string specifying the image name to use for the container. - **Volumes** - An object mapping mount point paths (strings) inside the container to empty objects. diff --git a/components/engine/docs/reference/run.md b/components/engine/docs/reference/run.md index 4f6e679c9e..87fb0e8c81 100644 --- a/components/engine/docs/reference/run.md +++ b/components/engine/docs/reference/run.md @@ -1305,6 +1305,10 @@ or two examples of how to pass more parameters to that ENTRYPOINT: $ docker run -it --entrypoint /bin/bash example/redis -c ls -l $ docker run -it --entrypoint /usr/bin/redis-cli example/redis --help +You can reset a containers entrypoint by passing an empty string, for example: + + $ docker run -it --entrypoint="" mysql bash + > **Note**: Passing `--entrypoint` will clear out any default command set on the > image (i.e. any `CMD` instruction in the Dockerfile used to build it).