Skip to content
Snippets Groups Projects

Stack Compose Clamav demon et interface REST

  • Clone with SSH
  • Clone with HTTPS
  • Embed
  • Share
    The snippet can be accessed without any authentication.
    Authored by erwan.salmon

    Encapsulation dans une stack Docker de l'image Clamav https://hub.docker.com/r/clamav/clamav Par défaut le démon Clamd écoute sur son port habituel (3310) et peut être appelé par les clients usuels.

    Pré-requis : créer un volume docker nommé clamav-db

    $ docker volume create clam_db

    Exemples de librairies Clamav

    La stack contient aussi un exemple d'interface REST https://github.com/benzino77/clamav-rest-api. Une utilisation directe via une librairie du langage choisi est probablement tout aussi simple et plus performante.

    Edited
    clamav-docker-compose.yml 732 B
    version: "3"
    
    services:
      # Démon Clamav-
      clamav:
        image: clamav/clamav:stable
        restart: unless-stopped
        ports:
          - 3310:3310
        volumes:
          - type: volume
            source: clamav-db
            target: /var/lib/clamav
        networks:
          clam-net:
    
      # Interface REST - https://github.com/benzino77/clamav-rest-api
      clamav-rest-js:
        image: benzino77/clamav-rest-api
        restart: unless-stopped
        ports:
          - 8081:3000
        depends_on:
          - clamav
        environment:
          - NODE_ENV=production
          - CLAMD_IP=clamav
          - APP_FORM_KEY=FILES
          - APP_PORT=3000
        networks:
          clam-net:
    
    volumes:
      # Le volume clamav permet de conserver la base de signature sur la durée
      clamav-db:
    
    networks:
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment