---
version: '2'

x-default-settings:
  volumes: &default-volumes
    - ./fleet.crt:/etc/osquery/fleet.crt
    - ./example_osquery.flags:/etc/osquery/osquery.flags
  environment: &default-environment
    ENROLL_SECRET: "${ENROLL_SECRET:?ENROLL_SECRET must be set for server authentication}"
  command: &default-command osqueryd --flagfile=/etc/osquery/osquery.flags --tls_hostname=${FLEET_SERVER:-host.docker.internal:8080}
  ulimits: &default-ulimits
    core:
      hard:  1000000000
      soft:  1000000000
  extra_hosts: &extra-hosts
    - "host.docker.internal:host-gateway"
  platform: &default-platform linux/x86_64

services:
  ubuntu20-osquery:
    image: "osquery/osquery:4.9.0-ubuntu20.04"
    platform: *default-platform
    volumes: *default-volumes
    environment: *default-environment
    command: *default-command
    ulimits: *default-ulimits
    extra_hosts: *extra-hosts

  ubuntu18-osquery:
    image: "osquery/osquery:4.9.0-ubuntu18.04"
    platform: *default-platform
    volumes: *default-volumes
    environment: *default-environment
    command: *default-command
    ulimits: *default-ulimits
    extra_hosts: *extra-hosts

  ubuntu16-osquery:
    image: "osquery/osquery:4.9.0-ubuntu16.04"
    platform: *default-platform
    volumes: *default-volumes
    environment: *default-environment
    command: *default-command
    ulimits: *default-ulimits
    extra_hosts: *extra-hosts

  centos8-osquery:
    image: "osquery/osquery:4.9.0-centos8"
    platform: *default-platform
    volumes: *default-volumes
    environment: *default-environment
    command: *default-command
    ulimits: *default-ulimits
    extra_hosts: *extra-hosts

  centos7-osquery:
    image: "osquery/osquery:4.9.0-centos7"
    platform: *default-platform
    volumes: *default-volumes
    environment: *default-environment
    command: *default-command
    ulimits: *default-ulimits
    extra_hosts: *extra-hosts

  centos6-osquery:
    image: "osquery/osquery:4.9.0-centos6"
    platform: *default-platform
    volumes: *default-volumes
    environment: *default-environment
    command: *default-command
    ulimits: *default-ulimits
    extra_hosts: *extra-hosts

  debian10-osquery:
    image: "osquery/osquery:4.9.0-debian10"
    platform: *default-platform
    volumes: *default-volumes
    environment: *default-environment
    command: *default-command
    ulimits: *default-ulimits
    extra_hosts: *extra-hosts

  debian9-osquery:
    image: "osquery/osquery:4.9.0-debian9"
    platform: *default-platform
    volumes: *default-volumes
    environment: *default-environment
    command: *default-command
    ulimits: *default-ulimits
    extra_hosts: *extra-hosts
