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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM