简体   繁体   中英

Can I use Windows 10 Insider preview to build a docker image

I have a Eclipse App that only installs on Windows, while I have a Mac. I have downloaded the Windows 10 ISO from the insider preview program . Can I use it in docker to build a docker image? What can be the base image? The alternative is to use the VirtualBox, and install windows 10 in it. But I don't want to go for it, because I want to share the image with other colleagues who are on Windows.

If you want to run a Windows Container on a Mac you will need to intall Windows 10 Anniversay Update ISO as a VM via Virtualbox or install the operating sysem using Bootcamp .

Windows 10 Anniversay Edition now has native support for Containers so you can run docker images for Windows Server 2016 and/or Nanoserver.

Your colleagues will also need Windows 10 Anniversary Edition to run the image on their machines.

You will need a Windows virtual machine to run Windows 10 on your MAC. See also the answer in this Stackoverflow question for a discussion of docker container types and docker hosts types.

Background:

Linux-based docker containers only run on Linux docker hosts while Windows-based docker containers only run either on Windows 2016 or on Windows Nanoserver, where a Nanoserver can run on Windows 2016 or on Windows 10 Professional + Hyper-V .

If you want to run either Linux-based or Windows-based docker containers on a MAC, you will need a Linux-based or a Windows-based virtual machine, respectively.

Is it possible to exchanging Docker images instead of virtual machine images to reduce the size?

Not in your case, I think.

If you think about reducing the image size you intend to share with your colleagues, you might think about running Windows containers on a Windows virtual machine on your MACs and exchange the smaller docker images instead of sharing virtual machine images. However, this would require nested virtualization of Hyper-V and this is supported on Hyper-V-capable hardware only (see also an Hyper-V on Hyper-V example here ). Since you are using a MAC, I fear, you need to share the larger virtual machine image or better find a way to share only parts of it (eg share project code via git instead).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM