自定义容器启动脚本报错:exec user process caused "no such file or directory"
Posted Silence moment
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了自定义容器启动脚本报错:exec user process caused "no such file or directory"相关的知识,希望对你有一定的参考价值。
创建容器起不来,一直是restarting状态,查看容器的报错日志如下:
standard_init_linux.go:178: exec user process caused "no such file or directory"
standard_init_linux.go:178: exec user process caused "no such file or directory"
standard_init_linux.go:178: exec user process caused "no such file or directory"
standard_init_linux.go:178: exec user process caused "no such file or directory"
standard_init_linux.go:178: exec user process caused "no such file or directory"
原因是镜像的entrypoint设置的启动脚本格式是dos,在linux系统上用vi修改成unix格式即可
# vi filename
# :set ff 回车后看到当前文件的fileformat格式
# :set ff=unix 回车后输入:wq保存文件,重新build镜像即可。
# :set ff 回车后看到当前文件的fileformat格式
# :set ff=unix 回车后输入:wq保存文件,重新build镜像即可。
以上是关于自定义容器启动脚本报错:exec user process caused "no such file or directory"的主要内容,如果未能解决你的问题,请参考以下文章
解决:standard_init_linux.go:219: exec user process caused
#yyds干货盘点# 解决:standard_init_linux.go:219: exec user process caused
systemd-自定义启动服务报错-你在生产中遇到过什么印象深刻的错误?
在使用 terraform cloud [aws-provider] 启动 ec2 实例时,既不能执行 user_data 脚本,也不能使用连接块执行 remote-exec