启用Docker Remote API - raspberry pi / raspbian [英] Enable Docker Remote API - raspberry pi / raspbian

查看:253
本文介绍了启用Docker Remote API - raspberry pi / raspbian的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的起点是:

  • How to use docker remote api to create container?,

所以我编辑 /etc/init/docker.conf ,并将 DOCKER_OPTS 变量的2次更新更新为:

so I edit /etc/init/docker.conf and update 2 occurrences of the DOCKER_OPTS variable to:

DOCKER_OPTS =' - H tcp://0.0.0.0:4243 -H unix:///var/run/docker.sock'

然后,一个简单的测试来列出docker图像失败:

Then, a simple test to list docker images fails:

$ service docker restart
$ curl -X GET http://10.143.0.218:4243/images/json
curl: (7) Failed to connect to 10.143.0.218 port 4243: Connection refused

Docker版本是:

Docker version is:

$ sudo docker version
Client:
 Version:      1.12.3
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   6b644ec
 Built:        Wed Oct 26 19:06:36 2016
OS/Arch:      linux/arm

Server:
 Version:      1.12.3
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   6b644ec
 Built:        Wed Oct 26 19:06:36 2016
 OS/Arch:      linux/arm


推荐答案

没有测试这个,但是如果是Jessie,那么默认使用systemd作为init系统iirc,这对守护进程( dockerd )被配置并启动。

Not tested this, but if it's Jessie, then it uses systemd by default as the init system iirc, and this has implications for how the daemon (dockerd) is configured and started.

所以你正在编辑 /etc/init/docker.conf 文件,但我不认为这是被读取/使用。

So you're editing the /etc/init/docker.conf file but I don't think that's being read / used.

阅读这篇关于不同启动过程的文章在Docker的每个init系统上,以及用于特定systemd配置

Take a read of this article on different startup procedures on each init system in Docker, and this for specific systemd configuration.

这篇关于启用Docker Remote API - raspberry pi / raspbian的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆