mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-05 08:33:35 +01:00
cb0acbace4
This commit fixes #5072 Due to an issue in bzr, Clair container may consume a lot of CPU resource while updating the vuln data. This commit mitigates the impact by setting the cpu_quota of clair container. (default value of cpu_period is 100000 in v2 docker-compose template)
40 lines
779 B
Smarty
40 lines
779 B
Smarty
version: '2'
|
|
services:
|
|
ui:
|
|
networks:
|
|
harbor-clair:
|
|
aliases:
|
|
- harbor-ui
|
|
jobservice:
|
|
networks:
|
|
- harbor-clair
|
|
registry:
|
|
networks:
|
|
- harbor-clair
|
|
postgresql:
|
|
networks:
|
|
harbor-clair:
|
|
aliases:
|
|
- harbor-db
|
|
clair:
|
|
networks:
|
|
- harbor-clair
|
|
container_name: clair
|
|
image: vmware/clair-photon:__clair_version__
|
|
restart: always
|
|
cpu_quota: 50000
|
|
depends_on:
|
|
- postgresql
|
|
volumes:
|
|
- ./common/config/clair/config.yaml:/etc/clair/config.yaml:z
|
|
logging:
|
|
driver: "syslog"
|
|
options:
|
|
syslog-address: "tcp://127.0.0.1:1514"
|
|
tag: "clair"
|
|
env_file:
|
|
./common/config/clair/clair_env
|
|
networks:
|
|
harbor-clair:
|
|
external: false
|