docker-compose up
Building app
Step 1/18 : FROM ubuntu:16.04
---> 065cf14a189c
Step 2/18 : WORKDIR /app/slyd
---> Using cache
---> f3d442d16560
Step 3/18 : ENV PATH="/opt/qt59/5.9.1/gcc_64/bin:${PATH}"
---> Using cache
---> d63807a0189a
Step 4/18 : ENV DEBIAN_FRONTEND noninteractive
---> Using cache
---> 56906c3f2800
Step 5/18 : ENV QT_MIRROR http://ftp.fau.de/qtproject/official_releases/qt/5.9/5.9.1/qt-opensource-linux-x64-5.9.1.run
---> Using cache
---> f016a3bc3c92
Step 6/18 : COPY docker/portia.conf /app/portia.conf
---> Using cache
---> 76e5b350e1fe
Step 7/18 : COPY docker/qt_install.qs /app/script.qs
---> Using cache
---> feceef58034f
Step 8/18 : COPY docker/provision.sh /app/provision.sh
---> Using cache
---> 9c9cfc8af6e8
Step 9/18 : COPY slybot/requirements.txt /app/slybot/requirements.txt
---> Using cache
---> f52dfafddf0d
Step 10/18 : COPY slyd/requirements.txt /app/slyd/requirements.txt
---> Using cache
---> 55ac7a356dbe
Step 11/18 : COPY portia_server/requirements.txt /app/portia_server/requirements.txt
---> Using cache
---> c68677bb7f94
Step 12/18 : RUN /app/provision.sh prepare_install && /app/provision.sh install_deps && /app/provision.sh install_qtwebkit_deps && /app/provision.sh download_official_qt && /app/provision.sh install_official_qt && /app/provision.sh install_qtwebkit && /app/provision.sh install_pyqt5 && /app/provision.sh install_python_deps && /app/provision.sh install_flash && /app/provision.sh install_msfonts && /app/provision.sh install_extra_fonts && /app/provision.sh remove_builddeps && /app/provision.sh remove_extra
---> Running in ecae0177bc5a
/bin/sh: 1: /app/provision.sh: Permission denied
ERROR: Service 'app' failed to build: The command '/bin/sh -c /app/provision.sh prepare_install && /app/provision.sh install_deps && /app/provision.sh install_qtwebkit_deps && /app/provision.sh download_official_qt && /app/provision.sh install_official_qt && /app/provision.sh install_qtwebkit && /app/provision.sh install_pyqt5 && /app/provision.sh install_python_deps && /app/provision.sh install_flash && /app/provision.sh install_msfonts && /app/provision.sh install_extra_fonts && /app/provision.sh remove_builddeps && /app/provision.sh remove_extra' returned a non-zero code: 126
启动的时候报这个/bin/sh: 1: /app/provision.sh: Permission denied,打开Dockerfile文件看了下,里面确实有/app/provision.sh,但是不知道在哪个文件夹里面
[root@localhost portia-scrapyd-web]# find ./ -name provision.sh
./docker/provision.sh
进入docker目录中,进行授权
chmod -R 755 ./
二次启动之后,有报错了,好烦,看着应该是什么没有下载成功
Executing command: download_official_qt
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 260 100 260 0 0 66 0 0:00:03 0:00:03 --:--:-- 66
APP_ROOT=/app
Executing command: install_official_qt
/downloads/qt-installer.run: 2: /downloads/qt-installer.run: Syntax error: newlin e unexpected
ls: cannot access '/opt/qt59/': No such file or directory
ERROR: Service 'app' failed to build: The command '/bin/sh -c /app/provision.sh p repare_install && /app/provision.sh install_deps && /app/provision.sh ins tall_qtwebkit_deps && /app/provision.sh download_official_qt && /app/prov ision.sh install_official_qt && /app/provision.sh install_qtwebkit && /ap p/provision.sh install_pyqt5 && /app/provision.sh install_python_deps && /app/provision.sh install_flash && /app/provision.sh install_msfonts && / app/provision.sh install_extra_fonts && /app/provision.sh remove_builddeps && /app/provision.sh remove_extra' returned a non-zero code: 2
[root@localhost portia-scrapyd-web]# wget -O qt-opensource-linux-x64-5.9.1.run ft p.fau.de/qtproject/official_releases/qt/5.9/5.9.1/qt-opensource-linux-x64-5.9.1.r un
--2021-07-13 09:15:35-- http://ftp.fau.de/qtproject/official_releases/qt/5.9/5.9 .1/qt-opensource-linux-x64-5.9.1.run
Resolving ftp.fau.de (ftp.fau.de)... 131.188.12.211, 2001:638:a000:1021:21::1
Connecting to ftp.fau.de (ftp.fau.de)|131.188.12.211|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2021-07-13 09:15:36 ERROR 404: Not Found.
到地址:https://download.qt.io/archive/qt/5.9/5.9.1/ 下载一下qt
官网下载真滴慢
谷歌了下解决方案
edit the Dockerfile, add this step:
COPY qt-opensource-linux-x64-5.9.1.run /downloads/qt-installer.run
and remove the line on RUN which does the download…
RUN /app/provision.sh prepare_install &&
/app/provision.sh install_deps &&
/app/provision.sh install_qtwebkit_deps &&
/app/provision.sh install_official_qt &&
/app/provision.sh install_qtwebkit &&
/app/provision.sh install_pyqt5 &&
/app/provision.sh install_python_deps &&
/app/provision.sh install_flash &&
/app/provision.sh install_msfonts &&
/app/provision.sh install_extra_fonts &&
/app/provision.sh remove_builddeps &&
/app/provision.sh remove_extra
重新启动,解决问题
访问http://127.0.0.1:9001/