shm-open / code-push-cli

A fork of code-push-cli tool to work with open source code-push-server
https://github.com/shm-open/code-push-cli
Other
43 stars 35 forks source link

code-push-cli docker 镜像 使用报错 #94

Open ywanhzy opened 1 year ago

ywanhzy commented 1 year ago

docker 使用这个镜像 https://hub.docker.com/r/imfms/code-push-cli 报错

Jenkins seems to be running inside container e774e1e18afc03ced92ef3ab86b7599f0d9a31be09223038211f4c844c5fd9e7 $ docker run -t -d -u 0:0 -w /var/jenkins_home/workspace/test@2 --volumes-from e774e1e18afc03ced92ef3ab86b7599f0d9a31be09223038211f4c844c5fd9e7 -e **** -e **** -e **** -e **** -e **** -e **** -e **** -e **** -e **** -e **** -e **** -e **** -e **** -e **** -e **** -e **** -e **** -e **** -e **** -e **** -e **** -e **** -e **** -e **** -e **** -e **** -e **** -e **** -e **** -e **** -e **** -e **** -e **** -e **** -e **** -e **** -e **** -e **** -e **** -e **** -e **** -e **** -e **** -e **** -e **** -e **** imfms/code-push-cli:2.5.2 cat $ docker top c5fb121eb710453e3c4c4be4f8832479e564b039cdfc6a62487915f6009fe800 -eo pid,comm ERROR: The container started but didn't run the expected command. Please double check your ENTRYPOINT does execute the command passed as docker run argument, as required by official docker images (see https://github.com/docker-library/official-images#consistency for entrypoint consistency requirements). Alternatively you can force image entrypoint to be disabled by adding option --entrypoint=''.

billxie1988 commented 7 months ago

这个错误信息指出容器虽然启动了,但没有执行预期的命令。这可能是因为容器的 ENTRYPOINT 和提供给 docker run 命令的参数之间存在冲突或不匹配问题。ENTRYPOINT 定义了容器启动时默认执行的命令,而 docker run 传递的命令参数通常被用于指定这个默认命令的具体参数或替换掉 ENTRYPOINT 执行的命令。

在你提供的 docker run 命令示例中,你尝试通过在容器中执行 cat 命令来启动容器,但容器并没有按预期运行这个命令。 如果你需要在启动容器时强制执行特定命令(比如 cat),可以在 docker run 命令中添加 --entrypoint 选项来显式指定 ENTRYPOINT。例如: docker run -t -d --entrypoint="" [其他选项] imfms/code-push-cli:2.5.2 cat