standard_init_linux.go:207: exec user process caused "no such file or directory"
原因一
Docker使用Alpine做基础镜像,Alpine默认/bin/sh, 要使用/bin/bash需要额外安装的。
entrypoint.sh 请使用 #!/bin/sh 开头。
原因二
entrypoint.sh 赋予执行权限
chmod +x entrypoint.sh
本文探讨了在使用Docker Alpine基础镜像时遇到的nosuchfileordirectory错误,主要原因是Alpine默认使用/bin/sh而非/bin/bash。文章提供了两种解决方案:一是确保entrypoint.sh脚本使用#!/bin/sh作为开头;二是为entrypoint.sh文件赋予执行权限。
standard_init_linux.go:207: exec user process caused "no such file or directory"
原因一
Docker使用Alpine做基础镜像,Alpine默认/bin/sh, 要使用/bin/bash需要额外安装的。
entrypoint.sh 请使用 #!/bin/sh 开头。
原因二
entrypoint.sh 赋予执行权限
chmod +x entrypoint.sh
2万+
1521
9122
3200

被折叠的 条评论
为什么被折叠?