dockerbuild设授权未经授权:authentication所需

我的docker版本是

Docker version 1.12.2-cs2-ws-beta, build 050b611 

我正在尝试使用命令来构build图像

 docker build -t iis-dockerfile . 

DockerFile的内容是

 FROM microsoft/iss RUN echo "Hello World - Dockerfile" > C:\inetpub\wwwroot\index.html 

config.json是

 { "auths": { "https://index.docker.io/v1/": { "auth": <somekey> } } } 

在运行docker构build,它会给出错误

 Sending build context to Docker daemon 2.048 kB Step 1/2 : FROM microsoft/iss unauthorized: authentication required 

我已经做了dockerlogin。 这就是如何创buildconfig.json。 我是容器的新手,按照入门教程https://blogs.msdn.microsoft.com/allthingscontainer/2016/09/15/windows-containers-getting-started-a-step-by-step-guide/ 。 任何想法我怎么能解决这个问题。

我还发现docker拉正在为我工​​作。 虽然这也需要authentication

只是一个观察。 确保您的docker文件具有正确的基本映像名称。 你确定你想FROM microsoft/iss而不是FROM microsoft/iis吗?

当我试图用正确的基本图像创build新的图像。 这似乎工作。

 Docker docker build -t test-iid . Sending build context to Docker daemon 344.9 MB Step 1/2 : FROM microsoft/iis latest: Pulling from microsoft/iis 3889bb8d808b: Downloading 3430754e4d17: Downloading 7aee39cd34f9: Downloading [> ] 540 kB/122.7 MB 5b8e6b632025: Download complete e067d71858d2: Download complete