Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
| ... | ... |
@@ -377,7 +377,9 @@ Create a container |
| 377 | 377 |
- **Labels** - Adds a map of labels to a container. To specify a map: `{"key":"value"[,"key2":"value2"]}`
|
| 378 | 378 |
- **Cmd** - Command to run specified as a string or an array of strings. |
| 379 | 379 |
- **Entrypoint** - Set the entry point for the container as a string or an array |
| 380 |
- of strings. |
|
| 380 |
+ of strings. If the array consists of exactly one empty string (`[""]`) then the entry point |
|
| 381 |
+ is reset to system default (i.e., the entry point used by docker when there is no `ENTRYPOINT` |
|
| 382 |
+ instruction in the Dockerfile). |
|
| 381 | 383 |
- **Image** - A string specifying the image name to use for the container. |
| 382 | 384 |
- **Volumes** - An object mapping mount point paths (strings) inside the |
| 383 | 385 |
container to empty objects. |
| ... | ... |
@@ -1305,6 +1305,10 @@ or two examples of how to pass more parameters to that ENTRYPOINT: |
| 1305 | 1305 |
$ docker run -it --entrypoint /bin/bash example/redis -c ls -l |
| 1306 | 1306 |
$ docker run -it --entrypoint /usr/bin/redis-cli example/redis --help |
| 1307 | 1307 |
|
| 1308 |
+You can reset a containers entrypoint by passing an empty string, for example: |
|
| 1309 |
+ |
|
| 1310 |
+ $ docker run -it --entrypoint="" mysql bash |
|
| 1311 |
+ |
|
| 1308 | 1312 |
> **Note**: Passing `--entrypoint` will clear out any default command set on the |
| 1309 | 1313 |
> image (i.e. any `CMD` instruction in the Dockerfile used to build it). |
| 1310 | 1314 |
|