mirrors: "192.168.50.119": endpoint: -"http://192.168.50.119" "docker.io": endpoint: -"https://7bezldxe.mirror.aliyuncs.com" -"https://registry-1.docker.io" configs: "192.168.50.119": auth: username:''# this is the registry username password:''# this is the registry password tls: cert_file:''# path to the cert file used in the registry key_file:''# path to the key file used in the registry ca_file:''# path to the ca file used in the registry "docker.io": auth: username:''# this is the registry username password:''# this is the registry password tls: cert_file:''# path to the cert file used in the registry key_file:''# path to the key file used in the registry ca_file:''# path to the ca file used in the registry
mirrors: "35.182.134.80": endpoint: -"http://35.182.134.80" configs: "35.182.134.80": auth: username:admin# this is the registry username password:Harbor12345# this is the registry password
安全(https)私有仓库配置
使用授信 ssl 证书
1 2 3 4 5 6 7 8 9
mirrors: "harbor.kingsd.top": endpoint: -"https://harbor.kingsd.top" configs: "harbor.kingsd.top": auth: username:admin# this is the registry username password:Harbor12345# this is the registry password
使用自签 ssl 证书
如果后端仓库使用的是自签名的 ssl 证书,那么需要配置 CA 证书 用于 ssl 证书的校验。
1 2 3 4 5 6 7 8 9 10 11
mirrors: "harbor-ksd.kingsd.top": endpoint: -"https://harbor-ksd.kingsd.top" configs: "harbor-ksd.kingsd.top": auth: username:admin# this is the registry username password:Harbor12345# this is the registry password tls: ca_file:/opt/certs/ca.crt
mirrors: "harbor-ksd.kingsd.top": endpoint: -"https://harbor-ksd.kingsd.top" configs: "harbor-ksd.kingsd.top": auth: username:admin# this is the registry username password:Harbor12345# this is the registry password tls: ca_file:/opt/certs/ca.crt# path to the ca file used in the registry cert_file:/opt/certs/harbor-ksd.kingsd.top.cert# path to the cert file used in the registry key_file:/opt/certs/harbor-ksd.kingsd.top.key# path to the key file used in the registry