python - dockerfile 权限问题
过去多啦不再A梦
过去多啦不再A梦 2017-05-16 13:17:54
0
1
974

权限问题

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/debian

MAINTAINER Ysicing

ENV TZ "Asia/Shanghai"
ENV TERM xterm

#自定义源
ADD sources.list  /etc/apt/sources.list

VOLUME ["/data/ops"]

RUN mkdir -p /data/ops
COPY . /data/ops
WORKDIR /data/ops

RUN python3 -m pip install -r requirements.txt -i https://pypi.douban.com/simple
RUN chmod 777 /data/ops/docker-entrypoint.sh
RUN ls -lah /data/ops
EXPOSE 4000

ENTRYPOINT ["/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

不应该有权限吗

过去多啦不再A梦
过去多啦不再A梦

全部回复(1)
我想大声告诉你

docker-entrypoint.sh 显示需要执行权限,只有读写权限,加上执行权限才能执行

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责声明 Sitemap
PHP中文网:公益在线PHP培训,帮助PHP学习者快速成长!