简体   繁体   中英

Can we run Containers in Linux machine from docker Images built on windows machine?

We have Jenkins Build machines of Windows OS. But, we have Linux EC2 instances for running our Apps. So afraid, If we can use the Docker images built on windows to spin up containers in Linux machines.

Windows machine:

docker build -t "app-image-built-on-windows" .

Linux machine:

docker run app-image-built-on-windows

So is Docker images cross platform compatible? Please give the answers considering the usage in PROD for long time.

if your docker image is linux based then yes you can build on windows.

Windows Subsystem for Linux (WSL) 2 introduces a significant architectural change as it is a full Linux kernel built by Microsoft, allowing Linux containers to run natively without emulation.

and if your build was successful, you can run the container on linux machines.

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