Docker运行命令挂起

开始4/29/2017更新

PS C:\Users\shein> docker run -it ubuntu bash PS C:\Users\shein> docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES f358524abd13 ubuntu "bash" 2 minutes ago Up 2 minutes zen_feynman PS C:\Users\shein> docker kill $(docker ps -q) f358524abd13 PS C:\Users\shein> docker rm $(docker ps -a -q) f358524abd13 PS C:\Users\shein> docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES PS C:\Users\shein> docker images REPOSITORY TAG IMAGE ID CREATED SIZE ubuntu latest f7b3f317ec73 5 days ago 117 MB hello-world latest 48b5124b2768 3 months ago 1.84 kB PS C:\Users\shein> 

2017年4月29日更新

天哪,我是新来的docker和我最近的Docker安装(Docker版本17.03.1-ce,构buildc6d412e)在Windows 10上工作很好,为我拉下来的几个图像(我很高兴!),然后开始运行命令挂。

幸运的是,“docker运行你好,世界”仍然有效,但它是唯一仍然有效。

例如,“docker -it Ubuntu bash”不再运行,我不知道发生了什么变化。 input“docker -it Ubuntu bash”之后,它会一直挂起,直到我点击^ c。

另一个曾经工作但现在也挂起的例子是“docker run -it microsoft / dotnet:latest”。 我曾经得到一个bash提示符,可以编写,编译和运行Docker容器内的C#程序。 现在它只是在docker run命令中的返回键之后挂起。

我试图杀死所有的容器,并删除所有的图像。 见下面的结果。 “docker run -it ubuntu bash”只是再次挂起。

感谢齐格弗里德

 PS C:\Users\shein> docker run -it ubuntu bash docker : Unable to find image 'ubuntu:latest' locally At line:1 char:1 + docker run -it ubuntu bash + ~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (Unable to find ...latest' locally:String) [], RemoteException + FullyQualifiedErrorId : NativeCommandError latest: Pulling from library/ubuntu aafe6b5e13de: Pulling fs layer 0a2b43a72660: Pulling fs layer 18bdd1e546d2: Pulling fs layer 8198342c3e05: Pulling fs layer f56970a44fd4: Pulling fs layer 8198342c3e05: Waiting f56970a44fd4: Waiting 0a2b43a72660: Download complete 18bdd1e546d2: Download complete 8198342c3e05: Verifying Checksum 8198342c3e05: Download complete f56970a44fd4: Verifying Checksum f56970a44fd4: Download complete aafe6b5e13de: Verifying Checksum aafe6b5e13de: Download complete aafe6b5e13de: Pull complete 0a2b43a72660: Pull complete 18bdd1e546d2: Pull complete 8198342c3e05: Pull complete f56970a44fd4: Pull complete Digest: sha256:f3a61450ae43896c4332bda5e78b453f4a93179045f20c8181043b26b5e79028 Status: Downloaded newer image for ubuntu:latest 

在我的情况下,问题是因为我使用了Powershell ISE。

当我经常使用Powershel时,它工作正常。