Skip to content

Docker + File providers

It is possible to use several providers at the same time with Diun. This can be particularly useful if you want to analyze some images that you don't manage through a container.

In this section we quickly go over a basic docker-compose file to run Diun using the docker and file providers.


Create a docker-compose.yml file that uses the official Diun image:

version: "3.5"

    image: crazymax/diun:latest
    container_name: diun
    command: serve
      - "./data:/data"
      - "./custom-images.yml:/custom-images.yml:ro"
      - "/var/run/docker.sock:/var/run/docker.sock"
      - "TZ=Europe/Paris"
      - "LOG_LEVEL=info"
      - "LOG_JSON=false"
      - "DIUN_WATCH_SCHEDULE=0 */6 * * *"
      - "DIUN_PROVIDERS_FILE_FILENAME=/custom-images.yml"
    restart: always
# /custom-images.yml
- name:
- name: alpine
- name: debian:stretch-slim
- name: nginx:stable-alpine
- name: traefik
  watch_repo: true
    - ^\d+\.\d+\..*

Here we use a minimal configuration to analyze all running containers (watch by default enabled) of your local Docker instance with the Docker provider and also custom images through the File provider every 6 hours.

That's it. Now you can launch Diun with the following command:

docker-compose up -d

Last update: 2021-05-31 09:28:04
Created: 2020-12-11 07:25:41