docker for mac的JSON配置文件中的hosts项修改后无法生效

0

增加了以上配置之后,docker for mac就没法完成重启了,从文档上找到了下面这段话:

The options set in the configuration file must not conflict with options set via flags. The docker daemon fails to start if an option is duplicated between the file and the flags, regardless their value. We do this to avoid silently ignore changes introduced in configuration reloads. For example, the daemon fails to start if you set daemon labels in the configuration file and also set daemon labels via the --label flag. Options that are not present in the file are ignored when the daemon starts.

这段话或许能解释为何无法重启,但没有解答我的疑问。求赐教!

voidint  893
2017-08-06 提问
1 个回答
1

你是否是要开启2375端口访问docker远程管理接口?
我用docker自己的功能没有找到可以开启2375管理docker的方法,但找到了其他方法推荐给你。
参考
https://my.oschina.net/u/2306...

安装scoat后使用这条命令就可以远程访问docker了
socat -d TCP-LISTEN:2375,reuseaddr,fork UNIX:/var/run/docker.sock
stackoverflow上也有类似的解答
https://stackoverflow.com/que...

You could consider using socat. It solved my problem, which seem to be similar.

This allows you to access your macOS host Docker API from a Docker container using: tcp://[host IP address]:2375

On macOS socat can be installed like this: 

brew instll socat
原文地址:https://www.cnblogs.com/williamjie/p/11307413.html