![docker for mac net host docker for mac net host](https://static.macupdate.com/screenshots/254474/m/docker-screenshot.png)
I have already created an ASP.NET MVC application in my local machine using Visual Studio and created Web Deploy Package using the Publish feature in Visual Studio. Please note that we will be using the custom image which we created instead of the microsoft/iis image because we need to enable ASP.NET as well web deploy package in the image to host an ASP.NET Application. Let's now create the image for our application based on the image we just now created. Step 2 : Create Image for our ASP.NET MVC App You can verify the images is successfully built or not by executing the docker images command as shown below
DOCKER FOR MAC NET HOST INSTALL
After that msiexec process is called using Powershell to install Web Deploy inside the container
DOCKER FOR MAC NET HOST DOWNLOAD
When the command is executed, it will first check whether image for IIS is available in locally in docker and if it's not found then will download it from Microsoft repository in Docker Hub. The second statement in the file is for installing the ASP.NET 4.5 feature and once that is finished it will create a folder named install in the container and then copies the installer package for Web Deploy which we downloaded earlier into it.
![docker for mac net host docker for mac net host](https://sqlplayer.net/wp-content/uploads/2019/11/download-docker-website.png)
Let's create the image by executing the following command docker build -t amaldevv/aspnetwithwebdeploy. RUN powershell start-Process msiexec.exe -ArgumentList '/i c:\install\WebDeploy_amd64_en-US.msi /qn' -Wait
![docker for mac net host docker for mac net host](https://m.media-amazon.com/images/I/51oomZEEWFL._AC_.jpg)
RUN dism /online /enable-feature /all /featurename:IIS-ASPNET45ĪDD WebDeploy_amd64_en-US.msi /install/WebDeploy_amd64_en-US.msi To create the image I have created a Dockerfile as given below FROM microsoft/iis So download the installer package for Web Deploy from the Microsoft site and store it in a folder in your local machine. Because in that image features such as ASP.NET 4.5 and Microsoft Web Deploy are not installed by default and we need to have it for deloying our application. In this post, I will explain the steps needed to host an ASP.NET MVC application on a IIS server running inside a docker container based on Windows Step 1 : Setup IIS with ASP.NET Supportįirst, we will create a new image based on the official IIS image released by Microsoft. In an earlier post which I published a week go, went through the steps needed for setting up an IIS server in a Docker container running on a Windows Server 2016 machine.