【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
重启电脑即可。