Category : .net-core

I’m having docker-compose.yml which content I’m not supposed to change. Is it possible to use docker-compose.debug.yml which I would use to override docker-compose.yml content but only inside Visual Studio Debug and Docker profile (defined in appsettings.json)? docker-compose.debug.yml will have an image built from local dev image file, different ports, … The goal is to have ..

Read more

I have Docker profile in the launchSettings.json like this "Docker": { "commandName": "Docker", "launchBrowser": true, "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}", "publishAllPorts": true, "useSSL": true } Since I’m having multiple docker-compose files like docker-compose.yml docker-compose.dev.yml docker-compose.prod.yml how can I use Docker profile in launchSettings.json and target specific docker compose yml file? Source: Docker..

Read more

I am trying to run a .Net Core based Azure Function inside a Docker container on a M1 Macbook without success so far. Originally I used the Azure Function Core Tools CLI to create the function with the following command: func init LocalFunctionsProject –worker-runtime dotnet –docker which created the following Dockerfile. FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS installer-env ..

Read more

I’m running locally on my windows Docker Desktop with linux containers. I created a zookeeper container using the following command : docker run -d –network kafka –name=MyZookeeper -p 2181:2181 -e ALLOW_ANONYMOUS_LOGIN=yes -e ZOOKEEPER_CLIENT_PORT=2181 confluentinc/cp-zookeeper:5.5.0 And a Kafka containier using this command : docker run -d –network kafka –name=MyKafka -p 9092:9092 -e ALLOW_PLAINTEXT_LISTENER=yes -e KAFKA_ZOOKEEPER_CONNECT=MyZookeeper:2181 -e ..

Read more

I have dockerized .net core 3.1 app which has docker-compose.yml to spin multiple services. When I start the app using docker-compose up everything works fine. The thing is that I would like to debug the application in the container. I have in launchSettings.json Docker profile as "Docker": { "commandName": "Docker", "launchBrowser": true, "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}", "publishAllPorts": ..

Read more

I have started my .net core 3.1 web app under docker container and I’m having info from docker desktop client Now listening on: http://[::]:80 info: Microsoft.Hosting.Lifetime[0] Application started. Press Ctrl+C to shut down. info: Microsoft.Hosting.Lifetime[0] Hosting environment: Development info: Microsoft.Hosting.Lifetime[0] Content root path: /app My controller looks like this [Route("hello/[controller]")] public class WorldController : ControllerBase ..

Read more

I’m trying to deploy an asp.net-core spa to a docker container but I’m having troubles in doing that. This is the image that I’m using FROM mcr.microsoft.com/dotnet/aspnet:5.0-buster-slim AS base WORKDIR /app EXPOSE 80 EXPOSE 443 FROM mcr.microsoft.com/dotnet/sdk:5.0-buster-slim AS build RUN apt-get update -yq && apt-get install curl gnupg -yq && curl -sL https://deb.nodesource.com/setup_10.x | bash ..

Read more

I have an issue when trying to fetch data from postgressql. I’m playing with microservices arhitecture using .NET Core 5.0 and postgressql as my db solution. I’m trying to containerize my app by using docker containers. And everything works fine till I try to fetch some data through API. I got this type of error: ..

Read more