Skip to content

dockerization problem #953

Closed
Closed

Description

@ffrankozz

I am working on a Windows 10 pro m/c.
I have used the latest OpenCVSharp libraries (4.3.0...)
My, for instance, webapi with aspnetcore version 3.1 works perfectly.
However when I create a linux docker container from the app and run it, it explodes spitting out
"System.TypeInitializationException' occurred in OpenCvSharp.dll: 'The type initializer for 'OpenCvSharp.NativeMethods' threw an exception.'" message,
on the first line it meets an OpenCVSharp call such as:

new Mat(100, 100, MatType.CV_8UC1, new Scalar(0));

Has anybody been able to run a linux container successfully so far from their OpenCVSharp4 application?

Activity

  1. shimat commented on May 18, 2020

    @shimat
    Owner

    I think there is something wrong with the library dependencies, you can use ldd command to check dependencies of libOpenCvSharpExtern.so.

    The Dockerfile I created may be helpful.
    https://github.com/shimat/opencvsharp/blob/master/docker/ubuntu.18.04-x64/Dockerfile

    I am aware of the following problem, but I don't have a good solution.
    #920

    I run an application with OpenCvSharp on Linux Docker on Google AppEngine Flexible.

  2. stale commented on Nov 14, 2020

    @stale

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

  3. added
    stale
    on Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    stale

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions