version: '3'

volumes:
  host-filesystem:
  docker-socket:

services:
  host-machine:
    privileged: true
    build:
      context: ${PWD}/host-machine
      dockerfile: ${PWD}/host-machine/Dockerfile
    volumes:
      - host-filesystem:/etc
      - docker-socket:/var/run
    ports:
      - "2375:2375"
    depends_on:
      - "falco"

  attacker-server:
    image: nginx:latest
    ports:
      - "8220:8220"
    volumes:
      - ${PWD}/attacker_files:/usr/share/nginx/html
      - ${PWD}/attacker-nginx.conf:/etc/nginx/conf.d/default.conf
    depends_on:
      - "falco"

  falco:
    image: falcosecurity/falco:latest
    privileged: true
    volumes:
      - docker-socket:/host/var/run
      - /dev:/host/dev
      - /proc:/host/proc:ro
      - /boot:/host/boot:ro
      - /lib/modules:/host/lib/modules:ro
      - /usr:/host/usr:ro
    tty: true
