2

We have a large application with several parts running on a Windows VM and I am trying to evaluate Docker containers for our application deployment. Is it possible to create a base docker image from an existing Windows VM already running my application? (I know this can be done using Dockerfile but I am looking for a quick way to create the image)

https://docs.docker.com/engine/userguide/eng-image/baseimages/ Above link describes creating image from working machine for Linux, but I am looking for something similar for Windows.

coder_andy
  • 376
  • 1
  • 3
  • 17
  • No it's not possible. You have some stuff like Vm2Docker etc but all it does the same thing you will do manually that is enumarate features installed and create some artifacts for you. But it's not possible to do for third party application as you mentioned. You'd have to disassemble it and figure out how to script install it. – Gregory Suvalian Dec 13 '17 at 22:15
  • Thanks for the reply. Can you please post this comment as a reply so I can accept it? – coder_andy Dec 14 '17 at 17:09

3 Answers3

1

The only base image for Windows that I know are the ones proposed by Microsoft, for Windows Server 2016 or 1709.
See "PoC: How to build images for 1709 without 1709"

That means you can translate any Widows VM into an image.

You would need:

If you application only runs on a Windows VM, you need to make sure it can be installed and run on one of those base Windows images.

EVen though you are using a VM Windows server 2016, you would not be able to quickly "capture its state": you need a Dockerfile to describe what you want your Widows container to run.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I know this can be done using Dockerfile, but I was looking for a way to directly create image from a running VM. Do you know if that can be done? – coder_andy Dec 14 '17 at 16:38
  • @coder_andy Is your running VM a Windows Server 2016 or 1709? Only such a VM could run images for Windows. But no, there is no way to capture the state of a VM as an image. You should describe it in a Dockerfile. – VonC Dec 14 '17 at 16:49
  • I am running Windows Server 2016 VM – coder_andy Dec 14 '17 at 17:06
0

No it's not possible. You have some stuff like Vm2Docker etc but all it does the same thing you will do manually that is enumerate features installed and create some artifacts for you. But it's not possible to do for third party application as you mentioned. You'd have to disassemble it and figure out how to scripts to install it.

Gregory Suvalian
  • 3,566
  • 7
  • 37
  • 66
-2

I am looking for a way to have a Development environment of Production web server for our Developers/testers created using Docker on windows. I have windows server 2016 OS installed on a Physical server (not VM), and want to dockerize it so that Dev team can make changes on it first and once they confirm all working fine then same changes will be done on production web server.

Thanks, RK.

  • 1
    This is not an answer, please post this on different question with a link to this question if it is related. – Juan Diego May 24 '18 at 16:30