Browse Source

Update documentation for entrypoint unset with `docker run/create`

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Yong Tang 9 years ago
parent
commit
26c913cb60
2 changed files with 7 additions and 1 deletions
  1. 3 1
      docs/reference/api/docker_remote_api_v1.25.md
  2. 4 0
      docs/reference/run.md

+ 3 - 1
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.

+ 4 - 0
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).