这太奇怪了,…我有一个码头图片,运行一个网络应用程序。WHen我运行它,容器中没有显示…没有错误。没有在码头ps -a下。
我运行了docker事件&然后再试一次,它报告了一个错误1…这显然是应用程序的错误,好吧。
所以,我重新运行为:
码头运行-it --entrypoint /bin/bash -p 80:80 -名称-d名称:最新-s
然后运行runall.sh中的每个项
前三项允许被拒绝:
uwsgi --http-套接字127.0.0.1:3009 -文件/var/www/cgi-bin/tireorder/main.wsgi -进程1-uid根-启用-线程-b 32768 -守护/var/www/cgi-bin/tireorder/tireorder.log -pidfile/var/www/cgi/tireorder/tireorder.pid
查找它,它似乎是一个用户权限,但所有的目录和文件都是完全访问根。
真正奇怪的是,我让它在windows和mint VM…中运行。但在生产(RHEL)或在我的linode VM(Centos 8,Debian 10,Ubuntu 21)是给予相同的许可拒绝!?
这是码头文件。
FROM lovato/python-2.6.6:latest
WORKDIR /
COPY trotta.tar.gz /
COPY runall.sh /
RUN chmod ugo+x runall.sh
RUN apt-get update
RUN apt-get install haproxy python python-pip python-dev nginx python-paste python-pastewebkit python-babel -y
RUN ["tar", "-xvzf", "trotta.tar.gz"]
RUN ["rm", "/etc/nginx/sites-enabled/default"]
RUN ["cp", "-R", "/usr/lib/python2.6/site-packages/Muntjac-1.1.2-py2.6.egg/muntjac", "/usr/lib/python2.7/dist-packages/"]
COPY uwsgi /usr/local/bin/
COPY /etc/default.conf /etc/nginx/conf.d/
COPY /etc/tireorder.conf /etc/
CMD ./runall.sh下面是runall.sh:
uwsgi --http-socket 127.0.0.1:3009 --file /var/www/cgi-bin/tireorder/main.wsgi --processes 1 --uid root --enable-threads -b 32768 --daemonize /var/www/cgi-bin/tireorder/tireorder.log --pidfile /var/www/cgi-bin/tireorder/tireorder.pid
uwsgi --http-socket 127.0.0.1:3310 --file /var/www/cgi-bin/tireorder2/main.wsgi --processes 1 --uid root --enable-threads -b 32768 --daemonize /var/www/cgi-bin/tireorder2/tireorder.log --pidfile /var/www/cgi-bin/tireorder2/tireorder.pid --chdir /var/www/cgi-bin/tireorder2
uwsgi --http-socket 127.0.0.1:3610 --file /var/www/cgi-bin/tireorder3/main.wsgi --processes 1 --uid root --enable-threads -b 32768 --daemonize /var/www/cgi-bin/tireorder3/tireorder.log --pidfile /var/www/cgi-bin/tireorder3/tireorder.pid --chdir /var/www/cgi-bin/tireorder3
service nginx start
/usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -p /var/run/haproxy.pid
tail -f /var/www/cgi-bin/tireorder/tireorder.log &
tail -f /var/www/cgi-bin/tireorder2/tireorder.log &
tail -f /var/www/cgi-bin/tireorder3/tireorder.log发布于 2021-08-17 13:36:49
Per :在dockerfile中的CMD命令之上添加运行chmod -R 775
这将在应用文件夹和uwsgi时解析它。
https://stackoverflow.com/questions/68808746
复制相似问题