Questions tagged .net-core

Explore the latest questions and answers asked by our top developers.

‘realpath(): Permission denied’ when running dotnet ef command as non-root in dotnet/sdk:3.1-bullseye container on k8s

Problem A container meant to run database migrations works locally, on Docker for Mac, but fails on Kubernetes, repeatedly logging realpath(): Permission denied Failed to resolve full path of the current executable [/proc/self/exe] Reproduction I have an image built from the following Dockerfiles (other descendents of base not included) #Dockerfile.base FROM RUN dotnet tool […]

By Ben
Categorised as .net-core, c#, docker, entity-framework, kubernetes Tagged , , , ,

How to substitute environment variables in Nuget.config when creating a Docker container via Azure Devops YAML Pipelines?

I am creating a .NET Core 6 web app inside a docker container via Azure Devops YAML pipelines. However I am having problems with nuget not restoring packages from a private commercial external nuget feed (for Telerik). "HTTP401 failed authentication" response. So how do I pass in in the values for the %TELERIKUSERNAME% and %TELERIKPASSWORD% […]

By Kyle
Categorised as .net-core, azure-pipelines, dockerfile, nuget Tagged , , ,

Why is core microservice returning 404?

I wrote a small demo to understand microservices and DDD. This is the file structure. ├───.dockerignore ├───docker-compose.yml ├───Dockerfile ├───MicroserviceDemo.sln ├───MicroserviceDemo.Application │ ├───MicroserviceDemo.Application.csproj │ └───… ├───MicroserviceDemo.Domain │ ├───MicroserviceDemo.Domain.csproj │ └───… └───MicroserviceDemo.Infrastructure ├───MicroserviceDemo.Infrastructure.csproj └───… If I run docker compose, the container run fine but I get a 404 when navigating to localhost:5000/swagger. I tried creating another dockerfile […]

By sebsmgzz
Categorised as .net, .net-core,, docker, microservices Tagged , , , ,

Deploy Blazor Client(WebAssembly) on Docker that time facing issue

When I deploy/run the project on Docker that time I am facing an issue. Facing issues like, Cannot use file stream for [/app/bin/Debug/net6.0/projectname.deps.json]: No such file or directory A fatal error was encountered. The library ‘’ required to execute the application was not found in ‘/app/bin/Debug/net6.0/’. Failed to run as a self-contained app. The application […]

By Akash Limbani
Categorised as .net, .net-6.0, .net-core, blazor, docker Tagged , , , ,

SendPingAsync Timeouts on WSL

I want to send Pings at a high interval at some sites, so I’ve created a simple C# Console App to do so: while (true) { var start = DateTimeOffset.Now.ToUnixTimeMilliseconds(); var pingTask = Task.Run(async () => { try { var pinger = new System.Net.NetworkInformation.Ping(); var pingReply = await pinger.SendPingAsync("", 250); Console.WriteLine(pingReply.Status); } catch (Exception ex) […]

Docker RUN dotnet Build always cached resulting in consecutive fault

I am currently struggling with Docker builds for .net Core 3.1 where RUN steps are cached, which they should not as this should always be executed: #10 [build 4/4] RUN dotnet publish "WKIS Solution.sln" -c UserManagementFrontendRelease -p:version=1.2.4 -o /app/publish –configfile FrontendWebApplication.UserManagement.Cicd/nuget.config #10 sha256:e8aeefc43305f5ab93d8c8fb78658174bdaa14d42c560daf9d764848da7f251c #10 CACHED Which is most likely the cause for the following step […]

By DominikAmon
Categorised as .net-core, docker, dockerfile Tagged , ,

Github action build fails on dotnet restore but local version works

I am using github to host private nuget packages, and the project I am trying to build an image for uses one of those packages. When image is being built via a github action I successfully add the nuget source, but restore fails to find it. However if I run it locally everything works just […]

By BillHaggerty
Categorised as .net-core, c#, dockerfile, github-actions, nuget Tagged , , , ,

Docker image with a single file app and the Petabridge command line?

I’m writing an hosted application that I intend to host in docker. I want to minimize the footprint so I’m making this a single file executable. But I also want to include the Petabridge command line. How would I go about doing this? Source: Docker Questions

By yozepi
Categorised as .net-core,, docker Tagged , ,

Plain .NET 5 project runs in Docker but doesn’t reacts to requests

I have a plain .NET 5 project with the default weather forecast. Running locally, it behaves as expected and the call to http://localhost:5000/WeatherForecast gives me the data. However, trying to reach the same address when running in Docker container fails. The only difference I can see between the logs is that they listen to different […]

By Konrad Viltersten
Categorised as .net-core, docker Tagged ,

docker .net 6 image magic file

hello i create default asp.mvc(core) .net 6 project in visual studio 2022 with checkbox "docker -linux". After docker build -> run image all work fine! But i find in image magic file which take 129kb with name equal project name. I havent this file in my project! I havent it file then i try without […]

By padavan
Categorised as .net-core,, c#, docker, dockerfile Tagged , , , ,
1 53

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us