Docker-映像操作系统"Windows"不能在此平台上使用 [英] Docker - image operating system "windows" cannot be used on this platform

查看:680
本文介绍了Docker-映像操作系统"Windows"不能在此平台上使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows 10计算机上尝试过此操作:

I tried this on my Windows 10 machine:

Dockerfile:

Dockerfile:

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

PS

C:\FSD\Docker\Trial1> docker build -t lea/leatest .
Sending build context to Docker daemon  2.048kB
Step 1/2 : FROM microsoft/nanoserver
latest: Pulling from microsoft/nanoserver
bce2fbc256ea: Pulling fs layer
58f68fa0ceda: Pulling fs layer
image operating system "windows" cannot be used on this platform

推荐答案

您的Docker主机配置为在VM内运行Linux容器.要运行Windows容器,您需要在Docker菜单中切换到Windows容器".有关文档,请在此处可用

Your Docker host is configured to run Linux containers inside of a VM. To run Windows containers, you need to "Switch to Windows containers" in the Docker menu. Documentation on that is available here.

这篇关于Docker-映像操作系统"Windows"不能在此平台上使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆