docker 在Windows下使用遇到的坑

1.大部分系统不支持直接安装docker for windows,只能使用docker toolbox,相当于在Windows上安装了一个linux的虚拟机

2.启动docker toolbox的时候,会出现找不到而去下载boot2docker.iso的情况,其实没有必要重新下载,在你安装docker toolbox的哪个目录,有这个文件,拷贝到它查找的目录即可

3.直接使用docker run 运行ubuntu的镜像时会出现 the input device is not a TTY.  If you are using mintty, try prefixing the command with 'winpty' 的错误,前面加上winpty即可,即winpty docker run ---

4.如果像在linux中直接使用 docker run -it ubuntu /bin/bash 去启动一个容器时,会出现一些非常奇葩的错误,我的错误是 docker: Error response from daemon: oci runtime error: container_linux.go:247: starting container process caused "exec: "D:/install/Git/usr/bin/bash": stat D:/install/Git/usr/bin/bash: no such file or directory".   我现在还不知道是什么原因,但是当我使用 docker run -it ubuntu bash去启动容器时,就可以正常启动,不会出现这些错误

原文地址:https://www.cnblogs.com/lwmp/p/6999742.html