You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

安装部署

version: '3'
 
services:
    coredns:
        #image: harbor.uenpay.com/base/coredns:latest
        image: registry.aliyuncs.com/google_containers/coredns
        network_mode: host
        restart: always
        container_name: coredns
        command:
        - --conf=/etc/coredns/Corefile
        volumes:
            - /data/coredns/config:/etc/coredns

配置文件,223.5.5.5 223.6.6.6也可以换成/etc/resolv.conf

.:53 {
    errors
    health {
       lameduck 5s
    }
    ready
    hosts /etc/coredns/customer-hosts . {
      fallthrough .
    }
    prometheus :9153
    forward . 223.5.5.5 223.6.6.6 {
      prefer_udp
    }
    cache 30
    log
    loop
    reload
    loadbalance
}

---
##需要添加解析只需要修改下面这个文件就可以了
cat /data/coredns/config/customer-hosts
10.10.21.200 gitlab.uenpay.com
10.10.49.202 wfm.weifumao.com
  • No labels