You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Dockerise ASP.NET Core app with Alpine image #4850
<PublishSingleFile>true</PublishSingleFile>
<RuntimeIdentifier>linux-musl-x64</RuntimeIdentifier>
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract> <!-- tried with and without this -->
Dockerfile contains:
FROM alpine
But when I start a container, I get:
Error relocating /dist/MyApp: __cxa_pure_virtual: symbol not found
Error relocating /dist/MyApp: __cxa_pure_virtual: symbol not found
Error relocating /dist/MyApp: __cxa_pure_virtual: symbol not found
Error relocating /dist/MyApp: _ZTVN10__cxxabiv121__vmi_class_type_infoE: symbol not found
Error relocating /dist/MyApp: _ZTVN10__cxxabiv121__vmi_class_type_infoE: symbol not found
Error relocating /dist/MyApp: _ZTVN10__cxxabiv121__vmi_class_type_infoE: symbol not found
It works with the normal image (i.e. FROM mcr.microsoft.com/dotnet/aspnet).
The docs imply that with the correct RID (linux-musl-x64), this should work. But obviously the generated binary is missing native dependencies.
Activity
javiercn commentedon Aug 30, 2023
Issue moved from dotnet/aspnetcore#50399
From @lonix1 on Wednesday, August 30, 2023 1:26:31 AM
UPDATE:
The answers in that SO thread explain that the
runtime-depsimage is needed for various alpine dependencies.So this is working properly, but the documentation needs some polish.
Somewhere in [1] or [2] it should mention that the self-contained single-file app cannot be run in
alpinedirectly, but can be run inruntime-deps.Could you possibly move this to the docs repo?
javiercn commentedon Aug 30, 2023
Issue moved from dotnet/aspnetcore#50399
From @javiercn on Wednesday, August 30, 2023 10:24:32 AM
@lonix1 thanks for contacting us.
This is more likely a question for the dotnet/docker repository since they centrally manage all images.
@richlander thoughts?