搜尋

首頁  >  問答  >  主體

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/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梦2753 天前1010

全部回覆(1)我來回復

  • 我想大声告诉你

    我想大声告诉你2017-05-16 13:19:54

    docker-entrypoint.sh 顯示需要執行權限,只有讀寫權限,加上執行權限才能執行

    回覆
    0
  • 取消回覆