我的docker文件看起来像
FROM grpc/python
CMD ["/bin/ls /"]
这是一个错误:
container_linux.go:265: starting container process caused "exec: \"/bin/ls /\": stat /bin/ls /: no such file or directory"
docker: Error response from daemon: oci runtime error: container_linux.go:265: starting container process caused "exec: \"/bin/ls /\": stat /bin/ls /: no such file or directory".
答案 0 :(得分:1)
您需要将命令与参数分开:
CMD ["/bin/ls", "/"]
CMD
接受以下格式:
CMD ["executable","param1","param2"] (exec form, this is the preferred form)
CMD ["param1","param2"] (as default parameters to ENTRYPOINT)
CMD command param1 param2 (shell form)
答案 1 :(得分:-2)
第二行ls
命令中的CMD
后面有额外空格