ASP.NET Core Web Application deployment on a Docker Container | AZURE VM | Docker File | PART-1
Vložit
- čas přidán 24. 04. 2021
- ASP.NET Core web application deployment on a Docker Container
Steps:-
- ASP.NET Core web application creation locally
- Creation of Ubuntu Server on Azure Cloud
- Docker container set-up on Ubuntu Server
- Docker File creation and walk-through
- Docker Image and Container Creation
- Testing the Running the web application on Docker Container
DOCKERFILE:-
FROM mcr.microsoft.com/dotnet/core/sdk:3.1
WORKDIR /app
COPY . .
ENV ASPNETCORE_URLS *:5000
EXPOSE 5000
ENTRYPOINT ["dotnet", "demoproj.dll"]
DOCKER SET-UP Commands:-
sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL download.docker.com/linux/ubu... | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] download.docker.com/linux/ubuntu bionic stable"
sudo apt update
sudo apt install docker-ce
DOCKER COMMANDS:-
sudo docker build -t dotnetapp .
sudo docker run -d -p 5000:5000 dotnetapp
Follow us @devopsmela on Instagram
Write us devopsmela@gmail.com - Věda a technologie
Good Explanation...Thanks for showing examples on dotnet application as I am dotnet developer.
Thanks! For the valuable feedback…
Thanks for uploading this, nicely explained
Thanks for uploading this, nicely done
Glad you enjoyed it
Thanks for detailed steps to deploy application on docker container. Is it possible to deploy application in docker container of azure VM using Azure CICD ?
Yes! It is possible to deploy on Azure VM too
If we do not want to have public ip on the VM. And access the application through private ip, is it possible?@DevOpsMela
Hi Preety, there are various ways to achieve the above scenario like you keep your application behind load balancer or application gateway etcetc…
please make a video on .net 6.0 using
After running sudo docker run -d -p 5000:5000 dotnetapp
Container status showing exited [1]
how to resolve
Hi Rohit, mostly the image which you have created has some issue, re-check your dockerfile and re-build the image once.
High quality content !! jus one doubt Why ubuntu is preferred for docker container ?
Thanks! And docker can we setup on other Linux flavours too like Centos, RHEL etc. so there is no such preference its upto the application your running and the underlying libraries it requires…
@@DevOpsMela ok great ! I am very Much new to this . I have another doubt So, after web api deployment can i deploy my angular as a another service in this same node or different node
Hello dear. Thanks for the video. In the last step even after adding 5000 port inbound rule in Azure portal i am still getting connection refused. Is there anything i am missing please guide ?
Hey Shashank,
Kindly share more details what all steps you have performed, bcoz just by connection refused its very difficult to decode..
Share details on devopsmela@gmail.com
Thanks..
@@DevOpsMela Thanks Rohit for your response. I will send you an email shortly
I have sent you an email Rohit. Thanks
Hi , I have created the ubentu server in Azure.But I am not able to access the machine. I am getting the error Access Denied. Do you have any solution for this issue.
Try resetting the password from the portal vm->help->reset password
can you please add SQL server on the docker container in production?
Yes, you can setup sql servers in containers too and for using the same in production you need to consider multiple factors…like SLA, Availability etc…
@@DevOpsMela thanks for your response, if possible can you please add a video on this topic ?
I am getting error in the end, while browsing VM ip
Share the error screenshot at devopsmela@gmail.com to debug the same
@@DevOpsMela Thanks, for support