I use a system with CentOS to host my ASP.NET Core API. I wanted to realise this with Docker. I then installed the necessary SDKs on my server.
sudo dnf install dotnet-sdk-5.0
This is the current State.
Then i created a Dockerfile that looks like this.
FROM microsoft/dotnet:latest COPY ./coinz-api /app WORKDIR /app RUN ["dotnet", "restore"] RUN ["dotnet", "build"] ENV ASPNETCORE_URLS http://*:5001 EXPOSE 5001 ENTRYPOINT ["dotnet", "run"]
When I try to build the Docker container this happens.
In my opinion, the required SDK and its runtimes are installed. So where is the error? Do I have the wrong versions?
EDIT: Here is my target. (Sorry its in German…)
Source: Docker Questions