Docker - image operating system “windows” cannot be used on this platform

后端 未结 5 1432
猫巷女王i
猫巷女王i 2021-01-30 12:16

I tried this on my Windows 10 machine:

Dockerfile:

From microsoft/nanoserver
CMD [\"echo\", \"Hello World\"]
         


        
5条回答
  •  天命终不由人
    2021-01-30 13:01

    microsoft/nanoserver is a windows native container image. So you cannot run this as linux containers run natively. It can only be run on windows 10 or windows server.

    If you are in windows 10, you can switch to windows containers by selecting

    switch to windows containers

提交回复
热议问题