Q. What is Image2Docker?
A. There have long been utilities that take an OS instance and convert it to a virtual machine. Image2Docker takes this to the next level by taking an OS instance, scans it and creates a Docker composition file. That composition file can then be modified and a Docker image built which can then be used within a container.
It has a version for Windows and a version for Linux and uses a series of detectives to run against the vhd/vhdx/wim (or anything that can be mounted). It then uses provisioners to create a dockerfile that includes all the files and components that are required (such as the iis files, asp.net, the app or if Linux apache etc) in addition to picking the right base OS image.
Once you have the image it can be used on-premises, in Azure or anywhere else.