我刚刚开始使用docker.我按照此处指定的说明https://docs.docker.com/windows/step_one/
我在Windows 10上安装了docker(1.10.2)并运行了docker run hello-world.但是,我收到了一个身份验证错误,而教程没有提到任何相关内容.
这是我收到的消息.
$ docker run hello-world
Unable to find image 'hello-world:latest' locally
docker: Error response from daemon: Authentication is required: Get https://registry-1.docker.io/v2/library/hello-world/manifests/latest: unauthorized: incorrect username or password.
See 'C:\Program Files\Docker Toolbox\docker.exe run --help'.
Run Code Online (Sandbox Code Playgroud)
我搜索了谷歌和这里,但找不到任何类似于此错误消息.
谢谢!
当条件匹配时,我一直试图摆脱循环.我试过下面的单行:
break if a is not None else time.sleep(1)
Run Code Online (Sandbox Code Playgroud)
还有这个
a is not None and break
time.sleep(1)
Run Code Online (Sandbox Code Playgroud)
两者都没有工作和投掷,SyntaxError而直接工作正常.
if a is not None:
break
time.sleep(1)
Run Code Online (Sandbox Code Playgroud)
虽然我这样使用它没有问题,但我只是想知道为什么上面的语法是错误的.