docker daemon.json
时间: 2023-08-10 09:06:50 浏览: 130
在安装docker后,默认情况下是没有daemon.json这个配置文件的,需要手动创建。这个配置文件用于统一管理不同系统下的docker daemon配置。编辑daemon.json后,需要执行以下命令来重启docker服务使配置生效:systemctl daemon-reload和systemctl restart docker。\[1\]\[2\]在编辑daemon.json文件时,可以添加一些配置项,比如dns配置,可以通过修改daemon.json文件中的dns字段来指定dns服务器的地址。例如:{ "insecure-registries": \["218.1.23.333:8089"\], "registry-mirrors": \["https://4xtasccp.mirror.aliyuncs.com"\], "dns":\["218.1.23.333"\] }。修改完后,需要重新加载配置文件并重启docker服务才能使配置生效。\[3\]
#### 引用[.reference_title]
- *1* [docker配置daemon](https://blog.csdn.net/qq_23898493/article/details/120880728)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [docker容器daemon.json配置文件详解](https://blog.csdn.net/Htojk/article/details/129523778)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [Looking in indexes: xxx WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None](https://blog.csdn.net/qq_41070393/article/details/126663520)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文