Windows——Docker拉取Windows Server镜像

2024-08-16 14:57:03 浏览数 (2)

前言

microsoft-windows-server: https://hub.docker.com/_/microsoft-windows-server

内容

报错

manifest unknown: manifest tagged by "latest" is not found

代码语言:javascript复制
[root@VM-0-11-centos ~]# docker pull mcr.microsoft.com/windows/server
Using default tag: latest
Error response from daemon: manifest for mcr.microsoft.com/windows/server:latest not found: manifest unknown: manifest tagged by "latest" is not found

因为windows server镜像没有维护latest的tag所以要拉取指定的tag

no matching manifest for linux/amd64 in the manifest list entries

  1. 详细内容
代码语言:javascript复制
PS C:UsersWangYang> docker pull mcr.microsoft.com/windows/server:ltsc2022
ltsc2022: Pulling from windows/server
no matching manifest for linux/amd64 in the manifest list entries
  1. 解决方法

切换到windows containers | 因为我已经切换过了,所以显示的是Linux containers

  1. 切换到windows containers的时候发生了错误,根据docker提示运行了下面命令并重启docker后再次尝试切换到windows containers成功
代码语言:javascript复制
PS C:UsersWangYang> Enable-WindowsOptionalFeature -Online -FeatureName $("Microsoft-Hyper-V", "Containers") -All


Path          :
Online        : True
RestartNeeded : False

拉取

代码语言:javascript复制
PS C:UsersWangYang> docker pull mcr.microsoft.com/windows/server:ltsc2022
ltsc2022: Pulling from windows/server
6d889b139513: Pull complete
b71990f305d9: Pull complete
Digest: sha256:0a3e159a8f249003a526b0540eb2b417ea8bf81052c3c0f4e5930e874c76d239
Status: Downloaded newer image for mcr.microsoft.com/windows/server:ltsc2022
mcr.microsoft.com/windows/server:ltsc2022

0 人点赞