我的Dockerfile结束:
ENTRYPOINT ["ls /etc"]
终奌站:
...Rest of the building above is fine
Step 8/8 : ENTRYPOINT ["ls /etc"]
---> Using cache
---> ea1f33b8ab22
Successfully built ea1f33b8ab22
Successfully tagged redis:latest
k@Karls ~/dev/docker_redis (master) $docker run -d -p 6379:6379 --name red redis
71d75058b94f088ef872b08a115bc12cece288b53fe26d67960fe139953ed5c4
docker: Error response from daemon: OCI runtime create Failed: container_linux.go:296: starting container process caused "exec: \"ls /etc\": stat ls /etc: no such file or directory": unknown.
由于某种原因,它将找不到目录/ etc.我做了一个pwd,当前的工作目录是/.我也在入口点上做了一个ls /并且显示了/ etc目录.
最佳答案
原文链接:https://www.f2er.com/docker/436219.html