title: volumes value ' do not match any of the regexes: u'^[a-zA-Z0-9._-]+$' - Error in elasticsearch docker-compose
body: <h2>Trying to start elastic search cluster using docker-compose given <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html" rel="nofollow noreferrer">here</a></h2>
  <ul>
  <li>I am not sure what is the issue here. I am running this docker-compose.yaml file in ubuntu 18.04 LTS. Tried find this error online but no help.</li>
  </ul>
  <h3>docker-compose.yaml</h3>
  <pre class="lang-yaml prettyprint-override"><code>##############################################################################################
  # LINKS - https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html
  ##############################################################################################
  version: &quot;2.2&quot;
  services:
    es01:
      image: docker.elastic.co/elasticsearch/elasticsearch:7.8.0
      container_name: es01_dev
      environment:
        - node.name=es01
        - cluster.name=&quot;es-docker-cluster&quot;
        - discovery.seed_hosts=es02,es03
        - cluster.initial_master_nodes=es01,es02,es03
        - bootstrap.memory_lock=true
        - &quot;ES_JAVA_OPTS=-Xms512m -Xmx512m&quot;
      ulimits:
        memlock:
          soft: -1
          hard: -1
      volumes:
        - /data/var/lib/elasticsearch-server_01:/usr/share/elasticsearch/data
  #      - /data/var/elasticsearch-server-backup:/var/elasticsearch-backup
  #      - /opt/elasticsearch-server/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
      ports:
        - 9200:9200
        - 9200:9200
      networks:
        - elastic
    es02:
      image: docker.elastic.co/elasticsearch/elasticsearch:7.8.0
      container_name: es02_dev
      environment:
        - node.name=es02
        - cluster.name=&quot;es-docker-cluster&quot;
        - discovery.seed_hosts=es01,es03
        - cluster.initial_master_nodes=es01,es02,es03
        - bootstrap.memory_lock=true
        - &quot;ES_JAVA_OPTS=-Xms512m -Xmx512m&quot;
      ulimits:
        memlock:
          soft: -1
          hard: -1
      volumes:
        - /data/var/lib/elasticsearch-server_02:/usr/share/elasticsearch/data
  #      - /data/var/elasticsearch-server-backup:/var/elasticsearch-backup
  #      - /opt/elasticsearch-server/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
      networks:
        - elastic
    es03:
      image: docker.elastic.co/elasticsearch/elasticsearch:7.8.0
      container_name: es03
      environment:
        - node.name=es03
        - cluster.name=&quot;es-docker-cluster&quot;
        - discovery.seed_hosts=es01,es02
        - cluster.initial_master_nodes=es01,es02,es03
        - bootstrap.memory_lock:=true
        - &quot;ES_JAVA_OPTS=-Xms512m -Xmx512m&quot;
      ulimits:
        memlock:
          soft: -1
          hard: -1
      volumes:
        - /data/var/lib/elasticsearch-server_03:/usr/share/elasticsearch/data
  #      - /data/var/elasticsearch-server-backup:/var/elasticsearch-backup
  #      - /opt/elasticsearch-server/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
      networks:
        - elastic
  
  volumes:
    /data/var/lib/elasticsearch-server_01:
      driver: local
    /data/var/lib/elasticsearch-server_02:
      driver: local
    /data/var/lib/elasticsearch-server_03:
      driver: local
  networks:
    elastic:
      driver: bridge
  </code></pre>
  <h3>But docker-compose up given me this error</h3>
  <pre class="lang-sh prettyprint-override"><code>visionary@instance-2:/opt/elasticsearch-server$ docker-compose up
  ERROR: The Compose file './docker-compose.yml' is invalid because:
  volumes value '/data/var/lib/elasticsearch-server_01', '/data/var/lib/elasticsearch-server_02', '/data/var/lib/elasticsearch-server_03' do not match any of the regexes: u'^[a-zA-Z0-9._-]+$'
  services.es01.ports value ['9200:9200', '9200:9200'] has non-unique elements
  </code></pre>
  <p>Not sure what is the issue here. Any help is appreciated.</p>