imazen / imageflow

High-performance image manipulation for web servers. Includes imageflow_server, imageflow_tool, and libimageflow
https://docs.imageflow.io/
GNU Affero General Public License v3.0
4.14k stars 140 forks source link

possible to run in alpine container? #644

Open Wolfmarsh opened 4 months ago

Wolfmarsh commented 4 months ago

Is it possible to run this in an alpine container?

I am trying to do that and running into the exception below. The same build/deploy works on a chiseled container. This is potentially due to alpine using musl C, maybe?

Anyone run into this before and have any thoughts?

`Looking for "libimageflow.so" RID="linux-x64", IsUnix=True, IsDotNetCore=True RelativeSearchPath="" Before searching: Unable to load shared library 'imageflow' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable: Error loading shared library /app/runtimes/linux-x64/native/imageflow.so: No such file or directory Error loading shared library /usr/share/dotnet/shared/Microsoft.NETCore.App/8.0.2/imageflow.so: No such file or directory Error loading shared library /app/imageflow.so: No such file or directory Error loading shared library imageflow.so: No such file or directory Error loading shared library libmvec.so.1: No such file or directory (needed by /app/runtimes/linux-x64/native/libimageflow.so) Error loading shared library /usr/share/dotnet/shared/Microsoft.NETCore.App/8.0.2/libimageflow.so: No such file or directory Error loading shared library /app/libimageflow.so: No such file or directory Error loading shared library libimageflow.so: No such file or directory Error loading shared library /app/runtimes/linux-x64/native/imageflow: No such file or directory Error loading shared library /usr/share/dotnet/shared/Microsoft.NETCore.App/8.0.2/imageflow: No such file or directory Error loading shared library /app/imageflow: No such file or directory Error loading shared library imageflow: No such file or directory Error loading shared library /app/runtimes/linux-x64/native/libimageflow: No such file or directory Error loading shared library /usr/share/dotnet/shared/Microsoft.NETCore.App/8.0.2/libimageflow: No such file or directory Error loading shared library /app/libimageflow: No such file or directory Error loading shared library libimageflow: No such file or directory

File not found: /app/x64/libimageflow.so File not found: /app/libimageflow.so Error "No such file or directory" (2) loading imageflow from /app/runtimes/linux-x64/native/libimageflow.so at Imageflow.Bindings.NativeMethods.imageflow_context_create(UInt32 imageflowAbiVerMajor, UInt32 imageflowAbiVerMinor) at Imageflow.Bindings.JobContextHandle.<>c.<.ctor>b__0_0() at Imageflow.Bindings.NativeLibraryLoader.FixDllNotFoundException[T](String basename, Func1 invokingOperation, IEnumerable1 customSearchDirectories)`

lilith commented 4 months ago

Right now we don't have a musl build, so a newish libc is required - which excludes Alpine. I would love a PR for a linux musl build, though!

On Wed, Feb 14, 2024, 11:50 AM John Marsh @.***> wrote:

Is it possible to run this in an alpine container?

I am trying to do that and running into the exception below. The same build/deploy works on a chiseled container. This is potentially due to alpine using musl C, maybe?

Anyone run into this before and have any thoughts?

`Looking for "libimageflow.so" RID="linux-x64", IsUnix=True, IsDotNetCore=True RelativeSearchPath="" Before searching: Unable to load shared library 'imageflow' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable: Error loading shared library /app/runtimes/linux-x64/native/imageflow.so: No such file or directory Error loading shared library /usr/share/dotnet/shared/ Microsoft.NETCore.App/8.0.2/imageflow.so: No such file or directory Error loading shared library /app/imageflow.so: No such file or directory Error loading shared library imageflow.so: No such file or directory Error loading shared library libmvec.so.1: No such file or directory (needed by /app/runtimes/linux-x64/native/libimageflow.so) Error loading shared library /usr/share/dotnet/shared/ Microsoft.NETCore.App/8.0.2/libimageflow.so: No such file or directory Error loading shared library /app/libimageflow.so: No such file or directory Error loading shared library libimageflow.so: No such file or directory Error loading shared library /app/runtimes/linux-x64/native/imageflow: No such file or directory Error loading shared library /usr/share/dotnet/shared/ Microsoft.NETCore.App/8.0.2/imageflow: No such file or directory Error loading shared library /app/imageflow: No such file or directory Error loading shared library imageflow: No such file or directory Error loading shared library /app/runtimes/linux-x64/native/libimageflow: No such file or directory Error loading shared library /usr/share/dotnet/shared/ Microsoft.NETCore.App/8.0.2/libimageflow: No such file or directory Error loading shared library /app/libimageflow: No such file or directory Error loading shared library libimageflow: No such file or directory

File not found: /app/x64/libimageflow.so File not found: /app/libimageflow.so Error "No such file or directory" (2) loading imageflow from /app/runtimes/linux-x64/native/libimageflow.so at Imageflow.Bindings.NativeMethods.imageflow_context_create(UInt32 imageflowAbiVerMajor, UInt32 imageflowAbiVerMinor) at Imageflow.Bindings.JobContextHandle.<>c.<.ctor>b__0_0() at Imageflow.Bindings.NativeLibraryLoader.FixDllNotFoundException[T](String basename, Func1 invokingOperation, IEnumerable1 customSearchDirectories)`

— Reply to this email directly, view it on GitHub https://github.com/imazen/imageflow/issues/644, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA2LH2BNERI6TOLOEG53ULYTT2NHAVCNFSM6AAAAABDIW3ZNWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGEZTIOBWGUZDEOA . You are receiving this because you are subscribed to this thread.Message ID: @.***>