环境:CentOS 7
文件列表
-rw-r–r--. 1 root root 3962 Apr 8 17:13 docker-entrypoint.sh
-rw-r–r--. 1 root root 5649 Apr 8 17:13 Dockerfile
build成功后运行,报错:
docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused “exec: “docker-entrypoint.sh”: executable file not found in $PATH”: unknown.
ERRO[0000] error waiting for container: context canceled
报错信息为 docker-entrypoint.sh 执行文件找不到,经过一番折腾,发现在build镜像时docker-entrypoint.sh没有执行权限。
解决办法:
1、更改文件权限
chmod +x docker-entrypoint.sh
2、重新build镜像