简体   繁体   中英

Can I create a Windows 2016 container image on a Windows 2019 server?

I have been creating Windows 2016 container images on Windows 2016 build server/agents and Windows 2019 container images on Windows 2019 build server/agents. I know about the compatibility issues with mixing and matching 2016 & 2019 container images as well as updates (ex: 1809 and 1909) within releases. I'm tired of having to maintain multiple build servers and would rather have one build server to build multiple container images. Can I use Windows' Hypervisor to build a Windows 2016 compatible docker images from within a Windows 2019 server? If so, how? If not, then that's fine, I just want to be sure. If it's complicated then fuggedaboutit.

Yes, this is one of the main reasons for using containers.

"Containers are a standardized unit of software that allows developers to isolate their app from its environment" ie isolating the Windows Server 2016 container from the host OS, Windows Server 2019 - https://www.docker.com/why-docker

See this article showing that shows it is not only possible but a viable solution - https://www.deploycontainers.com/2018/10/29/how-to-run-windows-server-2016-containers-on-server-2019-host/

As for the how , try following this article but reference the Windwos Server 2016 image instead of 2019 - https://4sysops.com/archives/configure-windows-server-2019-container-host-with-powershell/

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