docker杂记及gitlab、gitlab-runner

docker配置

daemon.json常用配置

{
  "registry-mirrors": ["仓库代理地址-pull"];
  "insecure-registries": ["仓库地址-push"],
  "allow-nondistributable-artifacts": ["不可分发的image(例如win的版权限制),允许push的例外仓库地址"],
  "dns": ["dns服务器地址"],
  "labels":["nodeName=node-xxx"], # docker主机的标签
  "hosts": ["unix:///var/run/docker.sock","tcp://0.0.0.0:2376"],
  "tlsverify": true, # 启用tls
  "tlscert":"crt文件路径",
  "tlskey":"key文件路径",
  "tlscacert":"pem文件路径",
  "live-restore": true # 酌情使用,关闭dockerd时容器不执行默认的关闭
}

更多