Modernizing .NET Apps with Docker, for IT Pros. Part 2.

Play Modernizing .NET Apps with Docker, for IT Pros. Part 2.
Sign in to queue

Description

The second video in the series showing you how to move existing .NET apps to Docker, so you can run them in Azure without any code changes.

In Part 2 I use the open-source PowerShell module, Image2Docker, to extract an ASP.NET 3.5 application from a Windows Server 2003 VM into Docker. The Image2Docker tool extracts the content for IIS apps from the source machine, and generates a Dockerfile.

The Dockerfile is a simple script which sets up your application in Docker. To package the app, you build the Dockerfile into a Docker image - and that's the portable unit. You can share that image on a public or private registry, and anyone with access can pull the image.

To run the app in Docker, you start a container from the image. The image contains everything the app needs to run, so it will behave in the same way on a developer laptop, on a server in the datacenter, and on a Windows VM in Azure.

Embed

Download

Download this episode

Download captions

The Discussion

  • User profile image
    Jack

    Hi Elton,

    I'm trying to containerize IIS running on Windows 2008R2 running on vSphere 6.7. My steps are as follows:
    - convert .vmdk to .vhdx
    - run Image2Docker 1.8.5
    - ConvertTo-Dockerfile -ImagePath I:\cloneVMIIS_3.vhdx -OutputPath I:\container2\ -MountPath C:\Image\ -Artifact IIS -ArtifactParam 'Default Web Site/Asghar' -Force –Verbose
    - in container2 I get the followings:
    - config folder
    - wwwroot folder
    - IIS.json file
    - no DockerFile due to the following error:
    Generate_IIS : You cannot call a method on a null-valued expression.
    At C:\Program Files\WindowsPowerShell\Modules\Image2Docker\1.8.5\Functions\Private\GenerateDockerfile.ps1:37 char:23
    + ... ockerfile = & "Generate_$Artifact" -MountPath $MountPath -ManifestPat ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (:) [Generate_IIS], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull,Generate_IIS
    I’d be grateful if you could help me resolve this problem.
    Many thanks,
    Jack

Add Your 2 Cents