diff --git a/docs/reference/api/docker_remote_api_v1.25.md b/docs/reference/api/docker_remote_api_v1.25.md index b83ce68cdf..aabd1d06d6 100644 --- a/docs/reference/api/docker_remote_api_v1.25.md +++ b/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/docs/reference/run.md b/docs/reference/run.md index 4f6e679c9e..87fb0e8c81 100644 --- a/docs/reference/run.md +++ b/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).