python - dockerfile 权限问题
问题描述
权限问题docker: Error response from daemon: oci runtime error: container_linux.go:247: starting container process caused 'exec: '/data/ops/docker-entrypoint.sh': permission denied'.Dockerfile 文件
FROM ysicing/debian# FROM dl.ysicing.net:5000/debianMAINTAINER YsicingENV TZ 'Asia/Shanghai'ENV TERM xterm#自定义源ADD sources.list /etc/apt/sources.listVOLUME ['/data/ops']RUN mkdir -p /data/opsCOPY . /data/opsWORKDIR /data/opsRUN python3 -m pip install -r requirements.txt -i https://pypi.douban.com/simpleRUN chmod 777 /data/ops/docker-entrypoint.shRUN ls -lah /data/opsEXPOSE 4000ENTRYPOINT ['/data/ops/docker-entrypoint.sh']CMD ['gunicorn', '--bind','0.0.0.0:4000','-w','4','app.create_app()', '--access-logfile', '/data/ops/app/logs/access.log', '--error-logfile', '/data/ops/app/logs/error.log']结果显示
-rw-r--r-- 1 root root 308 Apr 9 20:11 docker-entrypoint.sh
不应该有权限吗
问题解答
回答1:docker-entrypoint.sh 显示需要执行权限,只有读写权限,加上执行权限才能执行
相关文章: