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
Environment (please complete the following information):
OS: MacOs 12.0.1 M1
Framework: [net6.0]
Type of application: aspnet
Version of AspectInjector: 2.7.4
Describe the bug
When building our project with AspectInjector it fails when building a docker image:
docker build .
#12 4.013 qemu-x86_64: Could not open '/lib64/ld-linux-x86-64.so.2': No such file or directory #12 4.013 AspectInjector : error AI_FAIL: Aspect Injector processing has failed. See other errors. [/src/Core/Core.csproj]
It does work when I build it as an AMD64 image:
docker build . --platform=amd64
I don't know how AspectInjector works internally, but it looks like it is trying to run an x64 binary on an arm linux container.
It does not matter when using non alpine images, as I tried that as well.
To Reproduce
A steps to reproduce the bug. Or a description when it happens (in compile-time, in runtime).
It occurs during build time of the docker image on an m1 mac when dotnet publish -c Release -o out is executing.
Additional context
FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine AS build
WORKDIR /src
# Copy everythingCOPY src ./
# Restore as distinct layersRUN dotnet restore
# Build and publish a releaseRUN dotnet publish -c Release -o out
# Build runtime imageFROM mcr.microsoft.com/dotnet/aspnet:6.0-alpine
WORKDIR /src
COPY --from=build /src/out .
# expose the application on port 8080ENV ASPNETCORE_URLS=http://+:8080
EXPOSE 8080
ENTRYPOINT ["dotnet", "Api.dll"]
The text was updated successfully, but these errors were encountered:
Hi @pvoshell ,yes indeed, AspectInjector internally uses a set of binaries that are built for specific target platform. And there is no ARM variant yet. I'll consider this report as feature request
Environment (please complete the following information):
Describe the bug
When building our project with AspectInjector it fails when building a docker image:
docker build .
#12 4.013 qemu-x86_64: Could not open '/lib64/ld-linux-x86-64.so.2': No such file or directory
#12 4.013 AspectInjector : error AI_FAIL: Aspect Injector processing has failed. See other errors. [/src/Core/Core.csproj]
It does work when I build it as an AMD64 image:
docker build . --platform=amd64
I don't know how AspectInjector works internally, but it looks like it is trying to run an x64 binary on an arm linux container.
It does not matter when using non alpine images, as I tried that as well.
To Reproduce
A steps to reproduce the bug. Or a description when it happens (in compile-time, in runtime).
It occurs during build time of the docker image on an m1 mac when dotnet publish -c Release -o out is executing.
Additional context
The text was updated successfully, but these errors were encountered: