# Multiple conditions with autodiscover & docker containers

**URL:** <https://discuss.elastic.co/t/multiple-conditions-with-autodiscover-docker-containers/153634>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [October 23, 2018, 3:01pm UTC](https://discuss.elastic.co/t/multiple-conditions-with-autodiscover-docker-containers/153634 "2018-10-23T15:01:24Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [October 24, 2018, 6:05pm UTC](https://discuss.elastic.co/t/multiple-conditions-with-autodiscover-docker-containers/153634/2 "2018-10-24T18:05:59Z")

</div>

conditions syntax is more 'lisp-style', due to the YAML config file format.

E.g. your condition with 'and.not' must look like:

```auto
- condition.and:
  - contains: 
      docker.container.image: **SOMETHING**
  - not.contains:
      docker.container.image: **SOMETHING_ELSE**

```

The `and` operator gets a list of conditionals that must match. It's similar to "ALL".

P.S.: Thank you for taking the time and properly formatting your question on your first try 😉

---

_[View the full topic](https://discuss.elastic.co/t/multiple-conditions-with-autodiscover-docker-containers/153634)._
