Home jobs Devops Automation Docker (Part 2) – Docker Compose with .Net Core MVC and API

Docker (Part 2) – Docker Compose with .Net Core MVC and API


Sample application (.Net Core MVC + .Net Core API) integration sample with Docker Compose.

Docker Compose File Format Versions

Create Docker Images and Containers Sample CLI Commands
#1. Create webapi Image
docker build –tag dotnetcoredemo:webapi –file .ServicesAPIDNCD.Service.APIDockerfile .
#2. Create mvc image
docker build –tag dotnetcoredemo:mvc –file .ProjectDNCD.Project.PortalDockerfile .
#3. Create a local network
docker network create –driver nat demo-mynetwork
#4. Create container1
docker run –name main-api –publish 3333:80 –network demo-network1 dotnetcoredemo:webapi
#5. Create container1
docker run –name main-mvc -it –publish 3336:80 –network demo-network1 dotnetcoredemo:mvc

Docker Host to use Wifi Adapter
“dns”: [ “”, “” ]

Docker View Tools
1. Visual Studio 2019 (Go to Views menu – Other Windows – Containers) – Recommended
1. Powershell ISE
2. Visual Studio Code with Extension ‘Docker’
3. Docker Desktop Dashboard


Previous articleAWS vs Azure | Expert Talk with Sreeharsha Veerapalli | AWS Devops | Azure DevOps | Telugu | Pashams
Next articleAutoscaling with virtual node and Azure Kubernetes Service (AKS)


Please enter your comment!
Please enter your name here