本文主要是介绍Docker容器运行报错standard_init_linux.go:228: exec user process caused: no such file or directory,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
报错信息
standard_init_linux.go:228: exec user process caused: no such file or directory
排查点
在Dockerfile中使用了启动脚本entrypoint.sh
ENTRYPOINT ["entrypoint.sh"]
但是由于启动脚本entrypoint.sh
实在Windows环境下编写的,文件编码方式不是unix,所以无法执行。
修复
- 使用cmder或git bash工具用vim打开启动脚本
entrypoint.sh
,设置文件编码格式set ff=unix
- 重新构建docker镜像
- 使用新镜像重新启动容器
这篇关于Docker容器运行报错standard_init_linux.go:228: exec user process caused: no such file or directory的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!