Skip to content

Commit

Permalink
Add clair to apps
Browse files Browse the repository at this point in the history
Fixes #239
  • Loading branch information
Nekroze committed Mar 13, 2019
1 parent b1eb9b4 commit 6b8f74c
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/docker/Dockerfile.clair
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ARG CLAIR_TAG=latest
FROM "quay.io/coreos/clair:$CLAIR_TAG"

COPY configs/clair.yml /config/config.yaml

CMD ["-config=/config/config.yaml"]
16 changes: 16 additions & 0 deletions app/docker/configs/clair.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
clair:

database:
type: pgsql
options:
# PostgreSQL Connection string
# https://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-CONNSTRING
source: host=postgres port=5432 user=postgres sslmode=disable statement_timeout=60000

api:
# v3 grpc/RESTful API server address
addr: "0.0.0.0:6060"

# Health server address
# This is an unencrypted endpoint useful for load balancers to check to healthiness of the clair server.
healthaddr: "0.0.0.0:6061"
26 changes: 26 additions & 0 deletions app/docker/docker-compose.clair.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
version: '3.5'

services:

clair:
container_name: dab_clair
build:
context: .
dockerfile: Dockerfile.clair
args:
- "CLAIR_TAG=${DAB_APPS_CLAIR_TAG:-latest}"
labels:
description: 'Vulnerability Static Analysis for Containers'
com.centurylinklabs.watchtower.enable: 'true'
restart: on-failure
depends_on:
- postgres
expose:
- 6060
- 6061
tmpfs:
- /tmp

networks:
default:
name: dab_apps

0 comments on commit 6b8f74c

Please sign in to comment.