在lamp容器中运行某ying应用,但是提示目录权限问题,又不能每次手动进入容器中修改,于是便找到了下边这篇文章:http://note.qidong.name/2018/01/docker-volume-permission/

即定制ENTRYPOINT自动修改Docker中volume的权限

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没有执行权限。

chmod +x docker-entrypoint.sh

重新build后启动

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐