Restrict the CPU usage of Clair (#5217)

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)
This commit is contained in:
Daniel Jiang 2018-07-03 11:23:56 +08:00 committed by Yan
parent b02d100fb5
commit cb0acbace4

View File

@ -22,7 +22,7 @@ services:
container_name: clair container_name: clair
image: vmware/clair-photon:__clair_version__ image: vmware/clair-photon:__clair_version__
restart: always restart: always
cpu_quota: 150000 cpu_quota: 50000
depends_on: depends_on:
- postgresql - postgresql
volumes: volumes: