docker 详细文档

cat /etc/docker/daemon.json
{
          "registry-mirrors": ["https://gyszh473.mirror.aliyuncs.com","https://nrbewqda.mirror.aliyuncs.com","https://dmmxhzvq.mirror.aliyuncs.com","https://docker.mirrors.ustc.edu.cn/","https://reg-mirror.qiniu.com","https://hub-mirror.c.1com/","http://f1361db2.m.daocloud.io","https://registry.docker-cn.com"],  #允许访问的仓库
          "insecure-registries": ["192.168.70.125:5000"],   #声明哪些 registry 不需要 TLS 校验
          "data-root":"/data/docker",      #docker根目录的位置
          "exec-opts":["native.cgroupdriver=systemd"],      #
          "log-driver":"json-file",
          "log-opts": {"max-size":"100m", "max-file":"3"},   #日志驱动的参数
          "storage-driver": "overlay2",       #镜像 & 容器文件系统的实现方式
          "max-concurrent-downloads": 10,    #同一时间允许多少个 layer 下载
          "max-concurrent-uploads": 10,      #push 镜像时的并发层数
          "iptables": true,                  # Docker 操作宿主机 iptables
          "userland-proxy": true,            # 端口映射是否通过用户态代理实现
          "dns": ["223.5.5.5", "114.114.114.114"],  #容器内 /etc/resolv.conf 的来源
          "bip": "172.31.0.1/16",           # docker0 网桥的 IP + 网段   所有容器通过它 NAT 出去
          "live-restore": true   #false:Docker 挂 → 容器也停  true:Docker 挂 → 容器继续跑
        }
posted @ 2026-02-05 16:41  中午吃麻辣烫  阅读(3)  评论(0)    收藏  举报