I can’t get my application created with a dockerfile to work in rootless.
I saw that I had to add USER app but the problem is still there.
Here is my docker file :
# build .NET app:
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env
WORKDIR /app
# Copy everything
COPY . ./
# Restore as distinct layers
RUN dotnet restore
# Build and publish a release
RUN dotnet publish -c Release -o out
# Build runtime image
FROM mcr.microsoft.com/dotnet/aspnet:8.0
WORKDIR /app
COPY --from=build-env /app/out .
USER app
ENTRYPOINT ["dotnet", "app.dll"]
Here is the error I see in docker logs.
The command could not be loaded, possibly because:
- You intended to execute a .NET application:
The application ‘Intranet.dll’ does not exist. - You intended to execute a .NET SDK command:
No .NET SDKs were found.
Download a .NET SDK:
https://aka.ms/dotnet/download
In root mode the docker works fine.
2
Yes it’s a problem with dll name
thanks