Skip to content

Commit

Permalink
add trivy
Browse files Browse the repository at this point in the history
  • Loading branch information
metavige committed May 27, 2021
1 parent 2100c55 commit 1951dad
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
31 changes: 31 additions & 0 deletions harbor2/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,37 @@ services:
- 'traefik.http.routers.harbor.entrypoints=websecure'
- 'traefik.http.services.harbor.loadbalancer.server.port=8080'
- 'traefik.docker.network=devops'
trivy-adapter:
container_name: trivy-adapter
image: goharbor/trivy-adapter-photon:v2.2.2
restart: always
cap_drop:
- ALL
dns_search: .
depends_on:
- log
- redis
networks:
- devops
volumes:
- type: bind
source: ./harbor-data/trivy-adapter/trivy
target: /home/scanner/.cache/trivy
- type: bind
source: ./harbor-data/trivy-adapter/reports
target: /home/scanner/.cache/reports
- type: bind
source: ./common/config/shared/trust-certificates
target: /harbor_cust_cert
logging:
driver: "syslog"
options:
syslog-address: "tcp://127.0.0.1:1514"
tag: "trivy-adapter"
env_file:
./common/config/trivy-adapter/env
labels:
- 'traefik.enable=false'

networks:
devops:
Expand Down
4 changes: 2 additions & 2 deletions harbor2/harbor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ database:
max_open_conns: 1000

# The default data volume
data_volume: ./harbor-data
data_volume: /Volumes/RamDisk/harbor-data

# Harbor Storage settings by default is using /data dir on local filesystem
# Uncomment storage_service setting If you want to using external storage
Expand Down Expand Up @@ -117,7 +117,7 @@ log:
# are all valid.
rotate_size: 20M
# The directory on your host that store log
location: ./harbor-log
location: /Volumes/RamDisk/harbor-log

# Uncomment following lines to enable external syslog endpoint.
# external_endpoint:
Expand Down

0 comments on commit 1951dad

Please sign in to comment.