从天蓝色的Cloudshell(PowerShell)构建时无法使用mcr.microsoft.com/windows/servercore:ltsc [英] Unable to use mcr.microsoft.com/windows/servercore:ltsc when building from azure cloudshell (powershell)
问题描述
当我在本地构建时,此方法非常理想,但是为了避免将映像移至我试图在云中构建的Azure容器注册表中.
This works perfectly when I build locally, but to avoid having to move images to the azure container registry I am trying to build in the cloud.
Dockerfile包含:
Dockerfile contains:
FROM mcr.microsoft.com/windows/servercore:ltsc AS build-stage1
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
.
.
.
Step 5/37 : FROM mcr.microsoft.com/windows/servercore:ltsc AS build-stage1
manifest for mcr.microsoft.com/windows/servercore:ltsc not found: manifest unknown: manifest unknown
2019/10/01 14:32:28 Container failed during run: build. No retries remaining.
failed to run step ID: build: exit status 1
Run ID: ch1k failed after 7s. Error: failed during run, err: exit status 1
但是,当我从本地托管的Powershell进行构建时,相同的基本映像仍然可以正常工作.
And yet the same base image works fine when I build from a locally hosted powershell.
推荐答案
我不清楚您如何成功构建映像.但是我建议您看一下图像 mcr.microsoft.com/windows/servercore
在docker hub中.它还在此处给出了可用的标签.没有标记为 ltsc
.您需要在可用标签中选择一个.例如, mcr.microsoft.com/windows/servercore:ltsc2019
.
I'm not clear how do you build the image successfully. But I recommend you take a look at the image mcr.microsoft.com/windows/servercore
in the docker hub. And it also gives out the available tags here. There is no tag as ltsc
. You need to choose one in the available tags. For example, mcr.microsoft.com/windows/servercore:ltsc2019
.
更新:
我可以重现与您相同的问题,然后添加参数-平台窗口
,它可以完美运行.我建议您尝试一下.希望对您有所帮助.
I can reproduce the same issue as you got, then I add the parameter --platform windows
and it works perfectly. I recommend you take a try. Hope it helps.
这篇关于从天蓝色的Cloudshell(PowerShell)构建时无法使用mcr.microsoft.com/windows/servercore:ltsc的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!