Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Docker build fails on docker hub

I`m creating a dockerfile which contains both .NET Core, OpenCV and OpenCVSharp. You can find the full Dockerfile here: https://github.com/Josvds/dotnetopencv/blob/master/Dockerfile

During the build I get the following error, no matter what I change. I have tried this with using git clone and checking out the exact version also tried it with downloading zip and extracting.

[ 77%] Built target opencv_datasets
[ 77%] Generating qrc_window_QT.cpp
RCC: Error in '/build/opencv/modules/highgui/src/window_QT.qrc': Cannot find file 'files_Qt/Milky/48/28.png'

make[2]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/build.make:78: modules/highgui/qrc_window_QT.cpp] Error 1

make[1]: *** [CMakeFiles/Makefile2:4375: modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2

make: *** [Makefile:163: all] Error 2

Removing intermediate container ee966db89e4a
The command '/bin/sh -c make -j$(nproc)' returned a non-zero code: 2

When building this on my desktop (windows) or my personal server (debian) the build works perfectly.

RUN cmake \
    # Compiler params
    -D CMAKE_BUILD_TYPE=RELEASE \
    -D CMAKE_INSTALL_PREFIX=/build/dist \
    -D OPENCV_GENERATE_PKGCONFIG=YES \
    # Modules
    -D OPENCV_EXTRA_MODULES_PATH=/build/opencv_contrib/modules \
    # No examples
    -D INSTALL_PYTHON_EXAMPLES=NO \
    -D INSTALL_C_EXAMPLES=NO \
    # Support
    -D WITH_IPP=NO \
    -D WITH_1394=NO \
    -D WITH_LIBV4L=NO \
    -D WITH_V4l=YES \
    -D WITH_TBB=YES \
    -D WITH_FFMPEG=YES \
    -D WITH_GPHOTO2=YES \
    -D WITH_GSTREAMER=YES \
    -D WITH_QT=YES \
    -D WITH_OPENGL=YES \
    # NO doc test and other bindings
    -D BUILD_DOCS=NO \
    -D BUILD_TESTS=NO \
    -D BUILD_PERF_TESTS=NO \
    -D BUILD_EXAMPLES=NO \
    -D BUILD_opencv_java=NO \
    -D BUILD_opencv_python2=NO \
    -D BUILD_ANDROID_EXAMPLES=NO ..
RUN make -j$(nproc)
RUN make install

What I want to achieve with this is having one container (which I don't have to build over and over again) for several applications I`m creating. Within this I would like to be able to read MP4 files and RTSP streams (via TCP and UDP) from .NET Core with OpenCVSharp.

Someone with any idea what I`m doing wrong?