All Questions

Tagged with
Filter by
Sorted by
Tagged with
136 votes
5 answers
83k views

Why does aspnet core start on port 80 from within Docker?

TL;DR: Why does an aspnet core app run on port 80 from within a Docker image, but 5000 outside a docker image. Elaborate I went through the aspnet core / docker tutorial found here: https://learn....
Phillip Scott Givens's user avatar
97 votes
9 answers
22k views

The author primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain

While doing a docker build on my .NET Core project, I got the following error on all my NuGets: 80.19 /app/GradingTool.Tests/GradingTool.Tests.csproj : error NU3028: Package 'Microsoft....
Wilson Silva's user avatar
  • 1,405
68 votes
11 answers
82k views

Error: It was not possible to find any installed .NET Core SDKs

When I run the command docker run -i -t myProject it shows error: It was not possible to find any installed .NET Core SDKs Did you mean to run .NET Core SDK commands? Install a .NET Core SDK ...
iristan's user avatar
  • 681
63 votes
1 answer
10k views

Dotnet Core Docker Container Leaks RAM on Linux and causes OOM

I am running Dotnet Core 2.2 in a Linux container in Docker. I've tried many different configuration/environment options - but I keep coming back to the same problem of running out of memory ('docker ...
Peter Mills's user avatar
60 votes
12 answers
56k views

Getting "Program does not contain a static 'Main' method suitable for an entry point" when building using docker, why?

I'm running into an issue using Docker and couldn't find a proper solution. I'm trying to build a Docker image using .NET SDK 2.1. The thing is that when Docker tries to run the build statement, it ...
Van Darth Vadden's user avatar
58 votes
9 answers
52k views

ASPNETCORE_ENVIRONMENT in Docker

i have problems setting the ASPNETCORE_ENVIRONMENT variable running my project in a docker container. The problem is that the value is always set/overwritten to "Development". I have tried ...
Aaron's user avatar
  • 619
47 votes
7 answers
26k views

Performing a health check in .NET Core Worker Service

How can I implement health checks in a .NET Core Worker Service? The service will be run inside Docker and needs to be able to check the health of the service.
zby_szek's user avatar
  • 688
45 votes
15 answers
57k views

A fatal error was encountered. The library 'libhostpolicy.so' required

I am running dotnet core 2.0 console project. Ran into the following error when trying to run it from Docker. A fatal error was encountered. The library 'libhostpolicy.so' required to execute ...
Kiksen's user avatar
  • 1,659
43 votes
4 answers
50k views

Docker Compose - adding identifier to network name

I trying to create network in docker-compose.vs.debug.yml file: networks: myNetwork: driver: bridge But docker adding some identifier: docker network ls -> NETWORK ID NAME ...
Mark Sabakov's user avatar
42 votes
1 answer
2k views

Docker compose with .NET Core, SQL Server, Elasticsearch, and cerebro services

I'm trying to run a number of services using a docker-compose file. First of all let's say that Docker, version 20.10.3, is running on a Red Hat Enterprise Linux release 8.3. This is the docker-...
Francesco's user avatar
  • 571
41 votes
5 answers
13k views

Docker build complains it can't find nuget fallback package folder

I'm following the tutorial at https://learn.microsoft.com/en-us/dotnet/core/docker/docker-basics-dotnet-core#dockerize-the-net-core-application in learning to containerise .net core applications into ...
Colin Mackay's user avatar
  • 18.9k
36 votes
9 answers
26k views

docker container exits immediately even with Console.ReadLine() in a .NET Core console application

I am trying to run a .NET Core 1.0.0 console application inside a docker container. When I run dotnet run command from inside the Demo folder on my machine, it works fine; but when run using docker ...
Learning Docker's user avatar
36 votes
1 answer
31k views

appsettings.json vs appsettings.{Environment}.json in .NET Core apps

I am new in .NET Core and as far as I see from my search on the web, appsettings.Development.json is used for development config while developing the app and appsettings.Production.json is used on the ...
user avatar
31 votes
8 answers
31k views

How to connect ASP.Net Core to a SQL Server Docker container on Mac

I am developing an ASP.Net core MVC application using Visual Studio 2017 on Mac. However, I am facing some problems to connect to an instance of SQL Server that is running on a Docker container. ...
MikePR's user avatar
  • 2,836
29 votes
1 answer
43k views

Merging appsettings with environment variables in .NET Core

I am running a .NET Core app in Docker (in Kubernetes), passing environment variables to the Docker container and using them in my app. In my .NET Core app I have the following C# class: public ...
Marcus's user avatar
  • 8,430
29 votes
2 answers
24k views

System.Net.Http.HttpRequestException: Cannot assign requested address - error while communicating between 2 .net core web apps in localhost

I'm new to docker and I have a visual studio solution with 2 dotnet core projects - UI and API. I've added docker support for both projects and they worked normally anytime I debug. Now they have an ...
Yusuff Sodiq's user avatar
29 votes
3 answers
30k views

Parameters in .NET Core docker launchSettings.json

I am writing an ASP.NET Core application and I have a launchSettings.json file with the following content: { "iisSettings": { "windowsAuthentication": false, "...
Daniel's user avatar
  • 336
28 votes
6 answers
25k views

Is there a more elegant way to copy specific files using Docker COPY to the working directory?

Attempting to create a container with microsoft/dotnet:2.1-aspnetcore-runtime. The .net core solution file has multiple projects nested underneath the solution, each with it's own .csproj file. I am ...
sturmstrike's user avatar
28 votes
2 answers
7k views

.net core 2.0 logging inside Kubernetes pod console

I wrote few web APIs in .net core 2.0 and deployed it using a docker container inside a Kubernetes cluster. I am using the below logging configuration but can't see any logs inside the Kubernetes pod ...
Abhay's user avatar
  • 938
27 votes
1 answer
1k views

dotnet core + Angular Universal + docker => Prerendering failed because of error: Error: Cannot find module

We have a project developed using Dotnet core, Angular Universal. We use the prerender feature of Asp.net Core SPA services. In the local environment, the application works both on Windows, Linux. ...
Deniz İrgin's user avatar
26 votes
10 answers
66k views

appSettings.json for .NET Core app in Docker?

I am running a .net core app in a docker container. Here is my docker file (just to build a dev environment): FROM microsoft/dotnet:1.0.1-sdk-projectjson ENV ASPNET_ENV Development COPY bin/Debug/...
Sam Ellis's user avatar
  • 821
26 votes
2 answers
33k views

How do I register a new NuGet package source with dotnet CLI on Ubuntu 14.04?

I am running .NET Core 1.1.0 on Ubuntu 14.04, with the goal of hosting my Web APIs in Docker on Ubuntu. I want to build my packages on Ubuntu, but some of the NuGet references are hosted on an ...
Peter's user avatar
  • 5,835
26 votes
1 answer
13k views

Why FileSystemWatcher doesn't work in Linux container watching Windows volume

Given the program: using System; using System.IO; namespace fsw_bug_poc { class Program { private static FileSystemWatcher _fileSystemWatcher; static void Main(string[] args)...
natenho's user avatar
  • 5,403
25 votes
4 answers
11k views

How to do gracefully shutdown on dotnet with docker?

Is there a way to gracefully shut-down a DOTNET CORE application which is running in DOCKER? If yes, which event I should listen? All I want is upon cancellation request I would like to pass my ...
cilerler's user avatar
  • 9,230
24 votes
6 answers
17k views

.NET Core Docker Image for SPA Applications

What is the correct Docker image to use when creating a new ASP.NET Core MVC app, specifically with the React/Redux (or other Node.js required) template? If not a specific image, what commands or ...
falquan's user avatar
  • 597
23 votes
1 answer
10k views

.Net Core Machine Key alternative for webfarm

I have been using dotnet core to create an application that runs in a Kubernetes cluster on Linux hosts. As I was testing it noticed getting exceptions when validating the CSRF tokens, that makes ...
WillemdeKok's user avatar
22 votes
5 answers
39k views

How to add private nuget source in dotnet dockerfile?

I try to add (override) a private nuget source to my build script in order to add the user/pw - and keep it out of my source control. What I tried so far: nuget is not recognized as command inside ...
jwillmer's user avatar
  • 3,620
22 votes
3 answers
32k views

Connect to SQL Server database from a docker container

I have docker for windows installed on my machine. There is a console application targeting .net core 1.0.0 that tries to access a SQL Server database running on a different VM. I can ping the VM ...
Learning Docker's user avatar
21 votes
4 answers
9k views

dotnet restore incredibly slow inside docker-compose build

I have a .NET Core project that I'm building into a docker image. The Dockerfile looks like this: FROM mcr.microsoft.com/dotnet/core/sdk:3.0-alpine AS restore WORKDIR /tmp/build COPY ./*.sln . COPY ./...
Nick Coad's user avatar
  • 3,643
19 votes
8 answers
26k views

Install fonts in Linux container for ASP.NET Core

From Visual Studio, I've created a default ASP.NET Core Web Application with enabled Docker support. It's using the default Microsoft Offical image for Linux container. Here is my Dockerfile: FROM ...
hertzogth's user avatar
  • 286
19 votes
3 answers
16k views

Build docker in ASP.NET Core: "no such file or directory" error

I'm getting an error when I build my docker. Sending build context to Docker daemon 3.584 kB Step 1/8 : FROM microsoft/aspnetcore:1.1 ---> 2628aaa7b8cf Step 2/8 : ENV ASPNETCORE_URLS "http://*:...
mskuratowski's user avatar
  • 4,044
19 votes
4 answers
17k views

Should I use user-secrets or environment variables with docker

When using docker with asp.net core for development, should I use user-secrets or environment variables? I am using the default docker file that Visual Studio 2017 creates when adding a project, ...
darick_c's user avatar
  • 339
18 votes
4 answers
21k views

Docker File - Skipping Project. Because it was not found

I have a 3 Projects in a solution. [Solution] 'BuySellApi' (3 Projects) | +-- [BuySellApi] | | | +--- BuySellApi.csproj (This project holds the Docker file) | +-- [BuySellApi.Core] ...
55SK55's user avatar
  • 641
18 votes
4 answers
17k views

Dockerized Dotnet Core 2.1 throws Gdip exception when using Select.HtmlToPdf.NetCore

I am using Select.HtmlToPdf.NetCore(18.3.0) to convert Html to pdf in Dotnetcore 2.1. It is perfectly working in local environment but when hosted with Docker it throws an error saying, {"fileName":...
Isuru Amarathunga's user avatar
17 votes
4 answers
20k views

how to set the environment of dotnet core in docker?

I want to be able to run dotnet core by docker in different environments(for now just development and production) but my docker always start in production environment. here is my docker file: FROM ...
mmffggss's user avatar
  • 205
17 votes
2 answers
25k views

Error The 'ClientId' option must be provided. When building a docker image

I've started a new .net core project and I configured it to use the Google+ Api for authentication. My Client Id and Secret are stored using dotnet user-secrets. When I build my docker image I get ...
Woot's user avatar
  • 1,789
16 votes
8 answers
40k views

Could not execute because the application was not found or a compatible .NET SDK is not installed

I created a basic Rest API using ASP.NET Core 5 i want to make run with docker. The application works fine on IIS Express. https://learn.microsoft.com/fr-fr/aspnet/core/tutorials/first-web-api?view=...
davidvera's user avatar
  • 1,345
16 votes
5 answers
4k views

Visual Studio 2017 Docker - change the target for multi stage builds

If I have a docker file that has multiple stages (such as base and build), is there a way to change the docker command that visual studio uses when debugging the container - it seems to use the first ...
Pectus Excavatum's user avatar
16 votes
1 answer
8k views

Identity Server 4 and docker

I'm trying to configure IdentityServer4 with docker but I cannot make it work. To get started, I took the Client Credential example of the identity server documentation: Protecting an API using Client ...
nicolas's user avatar
  • 7,548
15 votes
6 answers
26k views

where does the "Unable to find fallback package folder" nuget error come from, when building project in a dockerfile?

When building, from a dockerfile, I get this: /usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018: The "...
Thomas's user avatar
  • 11.6k
15 votes
2 answers
6k views

Keep Dotnet Core Grpc Server running as a console application?

I am trying to keep a Grpc server running as a console daemon. This gRPC server is a microservice that runs in a docker container. All of the examples I can find make use of the following: Console....
Mitch Dart's user avatar
  • 1,341
15 votes
1 answer
10k views

Whats the difference between Unhealthy vs Degraded .NET health check status

I have an application running in Kubernetes. To take the advantage of rolling updates with no downtime, I have to implement the proper Health Checks, so the cluster can know when the application/...
lmcarreiro's user avatar
  • 5,572
14 votes
3 answers
10k views

How to customize the docker image name in VS2019

In vs2019, I generate the docker image in the output window, the original command to generate the image was: docker build -f "e:\work\dotnetcoreproject\rookie.qwt\rookie.qwt.webapi\dockerfile" --...
pepperann's user avatar
  • 159
14 votes
1 answer
21k views

Building a Docker image from a multi project dot net core solution

I am trying to build a docker image from a visual studio solution that consists of two projects: one project contains common code (http methods, logging etc) the other is the business logic and ...
Tim Keegan's user avatar
14 votes
3 answers
5k views

How can I target multiple .NET Core versions from a single Docker image?

I have a library that targets .NET Standard 2.0. To verify compatibility, I would like to run my unit tests with the current and long term support (LTS) versions of .NET Core. When this question was ...
Dan Jagnow's user avatar
  • 1,215
14 votes
5 answers
11k views

adding .net core to docker container with Jenkins

I'm trying to create a dockerfile that will build an image with .net core 2.0 and Jenkins. I'm kind of new to Docker but want to include .net core 2.0 in my container with Jenkins so I don't have to ...
Michael C's user avatar
  • 177
14 votes
2 answers
18k views

'dotnet build' command not finding NuGet packages (they exist)

I'm trying to build my .NET Core 2.1 application from the command-line on my Jenkins server. It builds fine on my local machine (Windows 10, Visual Studio 2017 Enterprise), and if I manually build it ...
ihendriks's user avatar
  • 423
14 votes
1 answer
7k views

Control lifetime of .NET Core console application hosted in docker

Disclaimer - this is almost the same question as docker container exits immediately even with Console.ReadLine() in a .net core console application - but I don't think accepted answer on this question ...
Jay's user avatar
  • 9,851
14 votes
3 answers
15k views

Output from .NET Core console app by docker logs

Should I see console output (Console.WriteLine) from my .NET Core console app dockerized (linux image) by using docker logs command?
dawid's user avatar
  • 298
13 votes
1 answer
15k views

How to add a edge/testing package to Alpine Linux?

I have an Azure Linux WebApp using docker-compose to run three containers: Asp.Net Core 3.1 WebApp, Nginx as reverse proxy and an Asp.Net Core WebJob (SKD 3) to gerenate PDF reports. The WebApp is at ...
Ricardo Gaefke's user avatar

1
2 3 4 5
31