I recently read about the docker containers. Hosting your web application has a docker container. I have some questions to ask cos I need some clearification.
I am currently using asp.net core 2.2 version. I create a new project and I checked the Enable docker box.
So I noticed a Dockerfile was created in the project.
Also noticed this in my .csproj file
Then in my nuget. I see Microsoft.VisualStudio.Azure.Containers.Tools.Target
Here is my question.
1. With my project setup assuming I want to deploy my web application on normal shared hosting. Would I be able to deploy it like a normal web application. Would I be getting errors owing to the docker settings.
2. If I am going to be deploying on a cloud hosting like Azure. Can I deploy to azure websites or do I have to create a special kind of deploy since it in a docker container.
3. Please why must I deploy as a docker. I read it helps to manage memory and you can have many containers on a vm and other reason.
Does this mean on one VM I can configure several domain names to it. one domain name to a container.
Please enlighten me cos am new to this docker container thing.
1) vm hosting. you get an actual virtual machine you configure anyway you want. You can install any supporting software you need. databases, caching servers, etc.
2) container hosting. you deploy a docker file with installation files, and the hosting sip build and runs the container. again you can install any docker supported software to go along with with web site.
3) web application hosting. this is the most limited. you are allowed to upload support files for a website. the ISP configures the hosting environment, and controls what version of the web software is supported. with a website, the ISP supplies the web
server and controls what options are supported.
deploying a docker container is different than a website.
for a website, you produce a publish of a files list that is copied via ftp or web deploy to the specified storage. with azure, you can use a git repository and have a build deploy
for container deployment, you create a docker file, and a deployment folder will all the files needed by the docker file. this is copied to a storage area on the ISP, and they run a docker build on your deployed files. your docker image will contain the
web server - either IIS, core itself, apache or ngnix.
often your docker deploy will be 2 steps. step 1 is build and a container to build the app in. step 2 is to build and publish to deployment container.
Ok thanks alot, so let assume I want to deploy my application azure websites or on a shared hosting would I be needing to delete the docker file that was created in it.
Cause I see a docker file in there. Want to be sure I can undo docker and redo without having deploying issues in future.
Also when is docker deploy approach the best use case for a server.
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
Member
98 Points
326 Posts
Hosting has Docker
Nov 16, 2019 05:10 PM|InspiredJide|LINK
Dear All,
I recently read about the docker containers. Hosting your web application has a docker container. I have some questions to ask cos I need some clearification.
I am currently using asp.net core 2.2 version. I create a new project and I checked the Enable docker box.
So I noticed a Dockerfile was created in the project.
Also noticed this in my .csproj file
Then in my nuget. I see Microsoft.VisualStudio.Azure.Containers.Tools.Target
Here is my question.
1. With my project setup assuming I want to deploy my web application on normal shared hosting. Would I be able to deploy it like a normal web application. Would I be getting errors owing to the docker settings.
2. If I am going to be deploying on a cloud hosting like Azure. Can I deploy to azure websites or do I have to create a special kind of deploy since it in a docker container.
3. Please why must I deploy as a docker. I read it helps to manage memory and you can have many containers on a vm and other reason.
Does this mean on one VM I can configure several domain names to it. one domain name to a container.
Please enlighten me cos am new to this docker container thing.
Thanks alot.
All-Star
58194 Points
15661 Posts
Re: Hosting has Docker
Nov 17, 2019 11:35 PM|bruce (sqlwork.com)|LINK
hosting providers have many hosting options:
1) vm hosting. you get an actual virtual machine you configure anyway you want. You can install any supporting software you need. databases, caching servers, etc.
2) container hosting. you deploy a docker file with installation files, and the hosting sip build and runs the container. again you can install any docker supported software to go along with with web site.
3) web application hosting. this is the most limited. you are allowed to upload support files for a website. the ISP configures the hosting environment, and controls what version of the web software is supported. with a website, the ISP supplies the web server and controls what options are supported.
deploying a docker container is different than a website.
for a website, you produce a publish of a files list that is copied via ftp or web deploy to the specified storage. with azure, you can use a git repository and have a build deploy
for container deployment, you create a docker file, and a deployment folder will all the files needed by the docker file. this is copied to a storage area on the ISP, and they run a docker build on your deployed files. your docker image will contain the web server - either IIS, core itself, apache or ngnix.
often your docker deploy will be 2 steps. step 1 is build and a container to build the app in. step 2 is to build and publish to deployment container.
Member
98 Points
326 Posts
Re: Hosting has Docker
Nov 18, 2019 10:13 PM|InspiredJide|LINK
Dear bruce,
Ok thanks alot, so let assume I want to deploy my application azure websites or on a shared hosting would I be needing to delete the docker file that was created in it.
Cause I see a docker file in there. Want to be sure I can undo docker and redo without having deploying issues in future.
Also when is docker deploy approach the best use case for a server.
Contributor
2690 Points
874 Posts
Re: Hosting has Docker
Nov 21, 2019 02:17 AM|Rena Ni|LINK
Hi InspiredJide,
For hosting on Docker,you could follow the tutorial as below:
#Containerize a .NET Core app
https://docs.microsoft.com/en-us/dotnet/core/docker/build-container
Best Regards,
Rena