Limit dns search in harbor containers (#6057)

This commit is to set dns search to null in the harbor containers,
that means the dns search domains of docker host doesn't impact
the network IO in the containers.

If do not set this, Harbor notary-server and notary-signer are resolving
the "mysql" alias to the resolv.conf search path instead of to "mysql."
for the notary-db bridge IP, see #6031.

Signed-off-by: wang yan <wangyan@vmware.com>
This commit is contained in:
Yan 2018-10-16 18:34:36 +08:00 committed by GitHub
parent 69825093b0
commit 08ae5f2f37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 0 deletions

View File

@ -16,6 +16,7 @@ services:
restart: always restart: always
networks: networks:
- harbor-chartmuseum - harbor-chartmuseum
dns_search: ""
depends_on: depends_on:
- redis - redis
volumes: volumes:

View File

@ -23,6 +23,7 @@ services:
image: goharbor/clair-photon:__clair_version__ image: goharbor/clair-photon:__clair_version__
restart: always restart: always
cpu_quota: 50000 cpu_quota: 50000
dns_search: ""
depends_on: depends_on:
- postgresql - postgresql
volumes: volumes:

View File

@ -18,6 +18,7 @@ services:
networks: networks:
- notary-sig - notary-sig
- harbor-notary - harbor-notary
dns_search: ""
volumes: volumes:
- ./common/config/notary:/etc/notary:z - ./common/config/notary:/etc/notary:z
env_file: env_file:
@ -39,6 +40,7 @@ services:
notary-sig: notary-sig:
aliases: aliases:
- notarysigner - notarysigner
dns_search: ""
volumes: volumes:
- ./common/config/notary:/etc/notary:z - ./common/config/notary:/etc/notary:z
env_file: env_file:

View File

@ -4,6 +4,7 @@ services:
image: goharbor/harbor-log:__version__ image: goharbor/harbor-log:__version__
container_name: harbor-log container_name: harbor-log
restart: always restart: always
dns_search: ""
volumes: volumes:
- /var/log/harbor/:/var/log/docker/:z - /var/log/harbor/:/var/log/docker/:z
- ./common/config/log/:/etc/logrotate.d/:z - ./common/config/log/:/etc/logrotate.d/:z
@ -20,6 +21,7 @@ services:
- ./common/config/registry/:/etc/registry/:z - ./common/config/registry/:/etc/registry/:z
networks: networks:
- harbor - harbor
dns_search: ""
environment: environment:
- GODEBUG=netdns=cgo - GODEBUG=netdns=cgo
depends_on: depends_on:
@ -41,6 +43,7 @@ services:
- ./common/config/registryctl/config.yml:/etc/registryctl/config.yml:z - ./common/config/registryctl/config.yml:/etc/registryctl/config.yml:z
networks: networks:
- harbor - harbor
dns_search: ""
environment: environment:
- GODEBUG=netdns=cgo - GODEBUG=netdns=cgo
depends_on: depends_on:
@ -58,6 +61,7 @@ services:
- /data/database:/var/lib/postgresql/data:z - /data/database:/var/lib/postgresql/data:z
networks: networks:
- harbor - harbor
dns_search: ""
env_file: env_file:
- ./common/config/db/env - ./common/config/db/env
depends_on: depends_on:
@ -79,6 +83,7 @@ services:
- /data/:/data/:z - /data/:/data/:z
networks: networks:
- harbor - harbor
dns_search: ""
depends_on: depends_on:
- log - log
logging: logging:
@ -101,6 +106,7 @@ services:
- /data/psc/:/etc/core/token/:z - /data/psc/:/etc/core/token/:z
networks: networks:
- harbor - harbor
dns_search: ""
depends_on: depends_on:
- log - log
- adminserver - adminserver
@ -116,6 +122,7 @@ services:
restart: always restart: always
networks: networks:
- harbor - harbor
dns_search: ""
depends_on: depends_on:
- log - log
- core - core
@ -136,6 +143,7 @@ services:
- ./common/config/jobservice/config.yml:/etc/jobservice/config.yml:z - ./common/config/jobservice/config.yml:/etc/jobservice/config.yml:z
networks: networks:
- harbor - harbor
dns_search: ""
depends_on: depends_on:
- redis - redis
- core - core
@ -153,6 +161,7 @@ services:
- /data/redis:/var/lib/redis - /data/redis:/var/lib/redis
networks: networks:
- harbor - harbor
dns_search: ""
depends_on: depends_on:
- log - log
logging: logging:
@ -168,6 +177,7 @@ services:
- ./common/config/nginx:/etc/nginx:z - ./common/config/nginx:/etc/nginx:z
networks: networks:
- harbor - harbor
dns_search: ""
ports: ports:
- 80:80 - 80:80
- 443:443 - 443:443