Elasticsearch Docker-Compose Security Environmental Variables Not Working

This works

docker run -d -p 9200:9200 --name elasticsearch -e "http.host=0.0.0.0" -e "transport.host=127.0.0.1" -e "xpack.security.enabled=false" docker.elastic.co/elasticsearch/elasticsearch:5.2.2

And it does not ask for a password.

Passing the same variable in compose does not work for disabling xpack security but it should:

          es:
            container_name: es
            hostname: es.development
            networks:
              network:
                aliases:
                  - es.development
            image: docker.elastic.co/elasticsearch/elasticsearch:5.2.2
            environment:
              - cluster.name=docker-clusterx
              - bootstrap.memory_lock=true
              - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
              - xpack.security.enabled=false
            ulimits:
              memlock:
                soft: -1
                hard: -1
            command: elasticsearch
            ports:
              - "9200:9200"

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.