Create a windows 10 image for use as a docker container

18,268

No, this won't work.

Windows Containers (this is the same as Docker containers on Linux) basically contain the "user-space" part of windows, but share the single underlying windows server kernel.

I find a convenient way to think of it is that each container is kind of like a separate isolated user account in windows. You can have multiple user accounts, and they each have their own private set of files, and are each walled off from eachother, but they are still tied directly to the underlying OS, and each all running on the same shared kernel.

This is great as with a single shared kernel we don't need hardware virtualization at the CPU or memory level so things can be much more efficient.

Following that design however, the Windows 10 UI and all that stuff aren't designed to work with the Windows Server 2016 kernel. They might work by co-incidence but it's not likely.

Also, you can't just take a VHD/WIM or other kind of image and say "that's my container". You've got to start with a "base image" which is effectively a representation of your main OS, and then apply changes as needed. I can't imagine trying to figure out the set of changes needed to take a base windows server, and turn it into windows 10.

Share:
18,268

Related videos on Youtube

Calanus
Author by

Calanus

Updated on September 18, 2022

Comments

  • Calanus
    Calanus almost 2 years

    I'm trying to create a Windows 10 image in order to dockerize an existing legacy application. For very good reasons, the base image has to be Windows 10 not Windows Server. How do I go about doing this?

    What I had in mind was:

    1) Create my vanilla Windows install as a Hyper-V machine

    2) Install the application onto it

    3) Shutdown this VM

    4) Convert the resulting VHDX to a Windows Image (WIM) file

    5) Somehow use this as the base image for docker

    Am I on the right path?

    • Michael Hampton
      Michael Hampton almost 8 years
      What are your "very good reasons"?
    • Daniel
      Daniel almost 8 years
      The closest to Windows Containers on Windows 10 that comes to my mind is App-V.
    • Calanus
      Calanus almost 8 years
      the good reason was for it to run SAS which only runs on non-server windows unless you by the server version
  • vidarlo
    vidarlo over 2 years
    That's not really a container'd Windows image. It's a container running a VM...