Skip to content

Instantly share code, notes, and snippets.

@dalang
Created May 27, 2018 07:11
Show Gist options
  • Save dalang/21e567a40e1a7854dbd3d4c56eccdea0 to your computer and use it in GitHub Desktop.
Save dalang/21e567a40e1a7854dbd3d4c56eccdea0 to your computer and use it in GitHub Desktop.
docker-compose for clair and clairctl
version: '2.1'
services:
postgres:
container_name: clair_postgres
image: postgres:latest
restart: unless-stopped
environment:
POSTGRES_PASSWORD: password
clair:
container_name: clair_clair
#image: quay.io/coreos/clair-git:latest
image: quay.io/coreos/clair:latest
restart: unless-stopped
depends_on:
- postgres
ports:
- "6060-6061:6060-6061"
links:
- postgres
volumes:
- /tmp:/tmp
- ./clair_config:/config
command: [-config, /config/config.yaml]
registry:
container_name: registry
image: registry:2
restart: unless-stopped
ports:
- "5000:5000"
clairctl:
image: jgsqware/clairctl:latest
container_name: clair_clairctl
restart: unless-stopped
environment:
- DOCKER_API_VERSION=1.24
volumes:
- ./docker-compose-data/clairctl-reports/:/reports/:rw
- /var/run/docker.sock:/var/run/docker.sock:ro
user: root
group_add:
- root
depends_on:
clair:
condition: service_started
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment