-
Notifications
You must be signed in to change notification settings - Fork 52
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
Error loading shared library libwasmtime in alpine docker image #82
Comments
Currently the wasmtime-dotnet package bundles a wasmtime executable that is not targeted for musl libc. Try installing the If not, you may either need to install a full glibc into your image or rebuild both the wasmtime library targeted against musl libc and the wasmtime-dotnet package to bundle the musl-libc-targeted wasmtime. That's obviously easier said than done, though. If the upstream Wasmtime repo starts producing musl libc artifacts, I can easily update the wasmtime-dotnet package to bundle it for the musl RIDs. |
@peterhuene what would it take to make use of the aarch64 artifacts from upstream? I recently started working with an M1 MacBook Pro, and am now getting this same behavior locally. Unable to load shared library |
@willhausman is that without using alpine, right? It should be easy enough to bundle aarch64 RID artifacts in the package, we're just not doing so yet. |
Correct, without alpine. I can open a separate issue if you prefer. |
That'd be great, thanks! |
Working for me! [ALPINE ] alpine:3.18 RUN apk add libwasmtime --repository=https://dl-cdn.alpinelinux.org/alpine/edge/testing |
Just got the same problem on alpine:3.18 on .NET 8 (I used For those people who couldn't make it work. The full solution is as below. FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine3.18 AS base
RUN addgroup -g 1000 -S <username> && \
adduser -u 1000 -S <username> -G <username>
RUN echo 'http://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories
RUN apk update --no-cache && apk upgrade --no-cache
RUN apk add libwasmtime --repository=dl-cdn.alpinelinux.org/alpine/edge/testing
# cut of for brevity
# ... |
I am experiencing this error when trying to build my docker image that uses wasmtime.
I stopped trying to build my own docker image and instead used the https://github.com/bytecodealliance/wasmtime-dotnet/tree/main/examples/hello sample project. The only thing I changed was to use
<PackageReference Include="Wasmtime" Version="0.32.0-preview1" />
instead of the ProjectReference.I tried 3 different Dockerfiles:
All 3 build successfully with
docker build -t test .
. When run withdocker run test
, Debian and Ubuntu both printHello from C#, WebAssembly!
as expected, but alpine throws the above exception.The text was updated successfully, but these errors were encountered: