-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
using PKCS11Interop on docker #212
Comments
What operating system do you use in your docker image? |
I use mcr.microsoft.com/dotnet/aspnet:6.0 as base |
I'm no docker expert but as I understand it So instead of e.g.
you'll need to use
|
I'm not docker expert either. dockerizing is for creating apps independent from OS. I use default Dockerfile which is create when creating new project. docker images have a OS with minimal requirements. so we should install extra packages if needed. I don't know what package I should install to use PKCS11Interop. with normal publish, it runs on windows and WSL. but when I create docker image, i get error. |
In your first post you wrote that Pkcs11Interop works for you on "Ubuntu 20.02". I don't think that version is correct. Could you please provide correct version of Ubuntu where your app is working fine outside the docker? |
I'm sorry.I mean 20.04 |
Quick update: I was able to reproduce the issue. I've created .NET 6 console app that works fine on Ubuntu 20.04 but does not work on |
As it turns out You need to map |
Hi. I can't use PKCS11Interop on docker. I use it in windows and Ubuntu 20.02. but when I try to use it on docker, I got this error message. (when loading library)
I think my broblem is discussed at #208, but couldn't find solution.
System.DllNotFoundException: Unable to load shared library 'libdl' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibdl: cannot open shared object file: No such file or directory
at Net.Pkcs11Interop.Common.NativeMethods.dlopen(String filename, Int32 flag)
at Net.Pkcs11Interop.Common.UnmanagedLibrary.Load(String fileName) in /src/Pkcs11Interop/Common/UnmanagedLibrary.cs
at Net.Pkcs11Interop.LowLevelAPI80.Pkcs11Library..ctor(String libraryPath) in /src/Pkcs11Interop/LowLevelAPI80/Pkcs11Library.cs
at Net.Pkcs11Interop.HighLevelAPI80.Pkcs11Library..ctor(Pkcs11InteropFactories factories, String libraryPath, AppType appType) in /src/Pkcs11Interop/HighLevelAPI80/Pkcs11Library.cs
at Net.Pkcs11Interop.HighLevelAPI80.Factories.Pkcs11LibraryFactory.LoadPkcs11Library(Pkcs11InteropFactories factories, String libraryPath, AppType appType) in /src/Pkcs11Interop/HighLevelAPI80/Factories/Pkcs11LibraryFactory.cs
The text was updated successfully, but these errors were encountered: