79129311

Date: 2024-10-26 19:24:13
Score: 0.5
Natty:
Report link

It is the same as you would do with any other dockerized workload but using windows containers.

You need to:

To build an asp.net application image using a dockerfile this would be the most straightforward example:

# Use the official Microsoft ASP.NET image with IIS pre-installed
FROM mcr.microsoft.com/dotnet/framework/aspnet:4.8

# Set working directory in container
WORKDIR /inetpub/wwwroot

# Copy the application files to the container
COPY . .

# Expose port 80 for IIS
EXPOSE 80

# No ENTRYPOINT or CMD needed, as IIS is configured to start automatically in this base image

You then need to tag the image, or have composer do that for you, push it to a registry and you are ready to deploy this somewhere. You can also run it locally with composer.

I am using these set of images to host legacy ASP.Net applications and Microsoft SQL Server 2022:

https://github.com/david-garcia-garcia/windowscontainers

My recommendation for hosting Windows Containers is Azure Kubernetes Service:

https://azure.microsoft.com/es-es/products/kubernetes-service

You will find windows support also on other cloud providers, but according to my personal experience the most stable hybrid (Linux + Windows because you cannot have a Windows only K8S cluster) cluster support is on AKS.

Reasons:
  • Contains signature (1):
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: David