【Docker】 pull Windows镜像时解决“image operating system “windows” cannot be used on this platform”错误

【Docker】 pull Windows镜像时解决**“image operating system “windows” cannot be used on this platform”**错误

问题描述

pull Windows镜像时候出现**“image operating system “windows” cannot be used on this platform”**错误。

docker pull xyzrobotics/win10:devel-test


原因分析

# 查看客户(本地)机器和服务机器的系统版本
docker version

客户机的系统是windows,服务器的系统是linux,俩者不一致导致出错。
在这里插入图片描述


解决方案

右下角右键点击docker Desktop–>选择Swith to Windows containers


客户机的系统和服务器的系统都是Windows,俩者保持一致。


问题描述

Swith to Windows containers时候出现**“Containers feature is disabled. Enable it using the PowerShell script (in an administrative PowerShe…”**错误


解决办法

管理员身份运行"命令提示符"或者Windows PowerShell,执行上述错误给出提示命令。

Enable-WindowsOptionalFeature -Online -FeatureName $("Microsoft-Hyper-V", "Containers") -All


重启电脑即可。

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值