diff --git a/image/dockerfile/entrypoint.md b/image/dockerfile/entrypoint.md index c652de7..1dc7b70 100644 --- a/image/dockerfile/entrypoint.md +++ b/image/dockerfile/entrypoint.md @@ -38,7 +38,7 @@ $ docker run myip -i docker: Error response from daemon: invalid header field value "oci runtime error: container_linux.go:247: starting container process caused \"exec: \\\"-i\\\": executable file not found in $PATH\"\n". ``` -我们可以看到可执行文件找不到的报错,`executable file not found`。之前我们说过,跟在镜像名后面的是 `command`,运行时会替换 `CMD` 的默认值。因此这里的 `-i` 替换了远了的 `CMD`,而不是添加在原来的 `curl -s http://ip.cn` 后面。而 `-i` 根本不是命令,所以自然找不到。 +我们可以看到可执行文件找不到的报错,`executable file not found`。之前我们说过,跟在镜像名后面的是 `command`,运行时会替换 `CMD` 的默认值。因此这里的 `-i` 替换了原来的 `CMD`,而不是添加在原来的 `curl -s http://ip.cn` 后面。而 `-i` 根本不是命令,所以自然找不到。 那么如果我们希望加入 `-i` 这参数,我们就必须重新完整的输入这个命令: