我刚刚在他们的网页上安装了Docker-Toolbox
我从Docker快速入门终端开始,如下所示
## .
## ## ## ==
## ## ## ## ## ===
/"""""""""""""""""\___/ ===
~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ / ===- ~~~
\______ o __/
\ \ __/
\____\_______/
docker is configured to use the default machine with IP 192.168.99.100
For help getting started, check out the docs at https://docs.docker.com
bash-3.2$
但当我尝试执行docker拉hello-world时,这是我看到的
bash-3.2$ docker run hello-world
Unable to find image 'hello-world:latest' locally
Pulling repository docker.io/library/hello-world
Network timed out while trying to connect to https://index.docker.io/v1/repositories/library/hello-world/images. You may want to check your internet connection or if you are behind a proxy.
bash-3.2$
怎么了?
在我的情况下,安装docker在Alpine Linux我得到的错误:
试图连接到https://index.docker.io/v1/repositories/library/........时,网络超时
使用脚本:
https://github.com/docker/docker/blob/master/contrib/download-frozen-image-v2.sh
的工作原理。它使用curl下载图像,然后告诉你如何解tar和“docker加载”它。
我在8.8.8.8尝试了上面的静态DNS方法和禁用ipv6(我不理解代理的事情),没有一个对我有用。
编辑9/8/2016:
我最初使用dropbear而不是openssh。用openssh重新安装Alpine修复了这个问题。
下一个问题是“ApplyLayer退出状态1 stdout: stderr: chmod /bin/mount: permission denied”错误。
从(nixaid.com/grsec-in-docker/):
为了构建Docker映像,我必须禁用以下grsec
保护。修改“/etc/sysctl.d/grsec.conf”文件如下:
kernel.grsecurity。Chroot_deny_chmod = 0
kernel.grsecurity。Chroot_deny_mknod = 0
kernel.grsecurity。chroot_caps = 0 #与systemd包/CAP_SETFCAP相关
但在alpine的案例中
/ etc / sysctl。d / 00-alpine上。
重新启动
2016年8月更新
使用Docker for Mac(版本1.12.0)时,看到了表单的问题:
➜ docker pull node
Using default tag: latest
Pulling repository docker.io/library/node
Network timed out while trying to connect to https://index.docker.io/v1/repositories/library/node/images. You may want to check your internet connection or if you are behind a proxy.`enter code here`
这个问题通过更新我的MacBook Pro无线网络设置来解决,以包括以下DNS条目:8.8.8.8
欲了解更多信息,请参阅这一期(日期),它提供了这里给出的答案。
在我的情况下,安装docker在Alpine Linux我得到的错误:
试图连接到https://index.docker.io/v1/repositories/library/........时,网络超时
使用脚本:
https://github.com/docker/docker/blob/master/contrib/download-frozen-image-v2.sh
的工作原理。它使用curl下载图像,然后告诉你如何解tar和“docker加载”它。
我在8.8.8.8尝试了上面的静态DNS方法和禁用ipv6(我不理解代理的事情),没有一个对我有用。
编辑9/8/2016:
我最初使用dropbear而不是openssh。用openssh重新安装Alpine修复了这个问题。
下一个问题是“ApplyLayer退出状态1 stdout: stderr: chmod /bin/mount: permission denied”错误。
从(nixaid.com/grsec-in-docker/):
为了构建Docker映像,我必须禁用以下grsec
保护。修改“/etc/sysctl.d/grsec.conf”文件如下:
kernel.grsecurity。Chroot_deny_chmod = 0
kernel.grsecurity。Chroot_deny_mknod = 0
kernel.grsecurity。chroot_caps = 0 #与systemd包/CAP_SETFCAP相关
但在alpine的案例中
/ etc / sysctl。d / 00-alpine上。
重新启动