- Part 1: Server Core, Containers and Setting Up a Base OS Image
- Part 2: Setting up an IIS Base Image and Creating Containers to Run a Website
- Part 3: Deploy an MVC Web Application to a Container (this post)
Setting up Containers for MVC Web Applications
Deploy an MVC application to a container
- Part 2: Setting up an IIS Base Image and Creating Containers to Run a Website (this post)
Creating an IIS Base Image for Containers
New-Container –Name ServerCoreIIS –ContainerImageName WindowsServerCore –SwitchName “DHCP”
- Part 1: Server Core, Containers and Setting Up a Base OS Image (this post)
- Part 3: Deploy an MVC Web Application to a Container
Windows Server 2016 Containers
Installing Windows Server Core and enabling the Container feature
Installing a Base OS Image
In an older post on website performance using concatenating and minification I used the Ajax Minifier tool to do the work and used an MSBuild file to run that tool, now I use gulp which I find easier as it only needs a dependency on node and so can be separated out from the Visual Studio project itself and run outside the build cycle.
When run in a CI/CD environment, the gulp file is processed before an actual build takes place, this is so that the AssemblyInfo.cs file can be amended with the version information. The gulp file can be broken down into 3 main parts; the version, concatenation and minification and the assembly version writing.
It is real easy to include a gulp task to TeamCity by creating a Build step to your pipeline and choosing the Command Line as the runner type.
Then specify ‘Custom script’ from the drop down and enter your normal gulp command in the Custom script text area.