得到"破管#34;使用boot2docker Mac构建Docker镜像时

时间:2014-03-22 22:53:18

标签: macos osx-mavericks docker

我已经按照http://docs.docker.io/en/latest/installation/mac/上的指南进行操作了。

我可以运行docker versiondocker ps等但是当我去运行docker build .时,它会开始上传并返回消息:" write tcp 127.0.0.1:4243 :破管"让我无法建立。

1 个答案:

答案 0 :(得分:0)

我登录了虚拟机boot2docker ssh,在/var/lib/boot2docker/docker.log找到了调试日志,发现了第一条有用的消息:

2014/03/22 22:28:57 POST /v1.10/build?rm=1&t=foo
[debug] api.go:942 Warning: client and server don't have the same version (client: 0.9.0, server: 0.8.0)
[error] api.go:959 Error: Multipart upload for build is no longer supported. Please upgrade your docker client.
[error] api.go:91 HTTP Error: statusCode=500 Multipart upload for build is no longer supported. Please upgrade your docker client.

所以我的Mac客户端(主机)Docker是v.9,守护进程是.8。不想摆弄boot2docker图像,我通过运行将Docker的客户端版本降级为.8:

rm /usr/local/bin/docker
cd ~/bin/
curl -o docker https://get.docker.io/builds/Darwin/x86_64/docker-0.8.0
sudo cp ~/bin/docker /usr/local/bin/

然后我的图像构建好了。