scrapinghub / splash

Lightweight, scriptable browser as a service with an HTTP API
BSD 3-Clause "New" or "Revised" License
4.05k stars 509 forks source link

build docker image failed #1061

Open shuimutiane opened 3 years ago

shuimutiane commented 3 years ago

hi,I am trying to build my own Docker image, I checkouted Splash source code using git, then executed the following command from Splash source root: $ docker build -t runoob/my-task-local:v1 . but I failed, who can help me? thanks~

In file included from /opt/qt-5.14/5.14.1/gcc_64/include/QtWidgets/qabstractspinbox.h:44:0, from /opt/qt-5.14/5.14.1/gcc_64/include/QtWidgets/qdatetimeedit.h:47, from /tmp/builds/pyqt5/sip/QtWidgets/qdatetimeedit.sip:26: /opt/qt-5.14/5.14.1/gcc_64/include/QtWidgets/qwidget.h:530:10: note: declared here void getContentsMargins(int left, int top, int right, int bottom) const; ^~~~~~ g++: internal compiler error: Killed (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate. See file:///usr/share/doc/gcc-7/README.Bugs for instructions. make[1]: [sipQtWidgetspart7.o] Error 4 Makefile:2294: recipe for target 'sipQtWidgetspart7.o' failed make[1]: Waiting for unfinished jobs.... make[1]: Leaving directory '/tmp/builds/pyqt5/QtWidgets' Makefile:144: recipe for target 'sub-QtWidgets-make_first-ordered' failed make: *** [sub-QtWidgets-make_first-ordered] Error 2 /tmp/builds / Removing intermediate container 1ce09fafd1fb ---> 9adcd7b583ff Step 76/100 : COPY --from=pyqt5-downloader /tmp/webengine.tar.gz /tmp/ ---> 71f1cb7d305b Step 77/100 : COPY dockerfiles/splash/install-pyqtwebengine.sh /tmp/install-pyqtwebengine.sh ---> 1714573a48fa Step 78/100 : RUN /tmp/install-pyqtwebengine.sh /tmp/webengine.tar.gz ---> Running in 658f0ca928a8 /tmp/builds / /tmp/builds/webengine /tmp/builds / Error: Unable to import PyQt5.QtCore. Make sure PyQt5 is installed. The command '/bin/sh -c /tmp/install-pyqtwebengine.sh /tmp/webengine.tar.gz' returned a non-zero code: 1

shuimutiane commented 3 years ago

I checkouted release 3.4.1, try to build the Docker image, but it is always running at setp 29, no error and no any output, as following

Step 27/61 : COPY dockerfiles/splash/qt-installer-noninteractive.qs /tmp/script.qs ---> Using cache ---> 59d6d7be63f4 Step 28/61 : COPY dockerfiles/splash/run-qt-installer.sh /tmp/run-qt-installer.sh ---> f3682414c583 Step 29/61 : RUN /tmp/run-qt-installer.sh /tmp/qt-installer.run /tmp/script.qs ---> Running in e6550ca32ac3

unclewh commented 3 years ago

same issue, did you solved it?

jazminebarroga commented 3 years ago

I have encountered both issues mentioned as well, any leads?

ndomar commented 2 years ago

Ran into the same issue, changing the value of the SPLASH_BUILD_PARALLEL_JOBS variable in the Dockerfile to 1 solved the issue for me.

The error probably happens when Docker tries to install the webengine before Pyqt5, which can happen since the commands in the Dockerfile are parallelized and webengine depends on pyqt5 but pyqt5 is not always installed before the webengine installation starts.