-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclair-compose.yml
75 lines (70 loc) · 1.69 KB
/
clair-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
---
version: "3.7"
# This is just to hold a bunch of yaml anchors and try to consolidate parts of
# the config.
x-anchors:
postgres: &postgres-image docker.io/library/postgres:12
traefik: &traefik-image docker.io/library/traefik:v2.2
clair: &clair-image quay.io/projectquay/clair:4.8.0
services:
clair-indexer:
image: *clair-image
container_name: clair-indexer
depends_on:
clair-database:
condition: service_healthy
environment:
CLAIR_MODE: "indexer"
volumes:
- "./clair_config/local-dev/clair:/config:ro"
networks:
- toolbox-net
clair-matcher:
image: *clair-image
container_name: clair-matcher
depends_on:
clair-database:
condition: service_healthy
environment:
CLAIR_MODE: "matcher"
volumes:
- "./clair_config/local-dev/clair:/config:ro"
networks:
- toolbox-net
clair-database:
container_name: clair-database
image: *postgres-image
environment:
POSTGRES_HOST_AUTH_METHOD: trust
volumes:
- type: bind
source: ./clair_config/local-dev/clair/init.sql
target: /docker-entrypoint-initdb.d/init.sql
healthcheck:
test:
- CMD-SHELL
- "pg_isready -U postgres"
interval: 5s
timeout: 4s
retries: 12
start_period: 10s
networks:
- toolbox-net
clair-traefik:
container_name: clair-traefik
image: *traefik-image
depends_on:
- clair-matcher
- clair-indexer
ports:
- '6060:6060'
- '8080:8080'
- '8443'
- '5432'
volumes:
- './clair_config/local-dev/traefik/:/etc/traefik/:ro'
networks:
- toolbox-net
networks:
toolbox-net:
external: true