Docker is a great tool for building, shipping, and running your applications. Many companies are already moving their legacy applications to Docker containers and now with the introduction of the Microsoft Windows Server 2016, Docker Engine can now run containers natively on Windows.To make it even easier, there’s a new prototyping tool for Windows VMs that shows you how to replicate a VM Image to a container.
Docker Captain Trevor Sullivan recently released the Image2Docker tool, an open source project we’re hosting on GitHub. Still in it’s early stages, Image2Docker is a Powershell module that you can point at a virtual hard disk image, scan for common Windows components and suggest a Dockerfile. And to make it even easier, we’re hosting it in the Powershell Gallery to make it easy to install and use.
In Powershell, just type:
Install-Module -Name Image2Docker
And you’ll have access to
ConvertTo-Dockerfile. You can even select which discovery artifacts to search for.
Currently Image2Docker supports VHD, VHDK, and WIM images. If you have a VMDK, Microsoft provides a great conversion tool to convert VMDK images to VHD images.
And as an open source project, lead by a Docker Captain, it’s easy to contribute. We welcome contributions to add more discovery objects and functionality.