# "environment: - xpack.security.enabled=true" does not work with docker-compose

**URL:** <https://discuss.elastic.co/t/environment-xpack-security-enabled-true-does-not-work-with-docker-compose/290389>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security, docker\
**Created:** [November 29, 2021, 4:19am UTC](https://discuss.elastic.co/t/environment-xpack-security-enabled-true-does-not-work-with-docker-compose/290389 "2021-11-29T04:19:24Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)\
**Post date:** [November 30, 2021, 8:09am UTC](https://discuss.elastic.co/t/environment-xpack-security-enabled-true-does-not-work-with-docker-compose/290389/2 "2021-11-30T08:09:51Z")

</div>

tpot's [`standard.yml`](https://github.com/telekom-security/tpotce/blob/master/etc/compose/standard.yml#L527) doesn't use the official Elasticsearch image.

I believe the image it relies on is this one: [tpotce/Dockerfile at master · telekom-security/tpotce · GitHub](https://github.com/telekom-security/tpotce/blob/master/docker/elk/elasticsearch/Dockerfile#L20-L27) which installs Elasticsearch from a tarball, and doesn't have the same support for configuration via docker environment variables.

You'll either need to take this up with them, or switch to using the [official Elasticsearch Docker image](https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html).

---

_[View the full topic](https://discuss.elastic.co/t/environment-xpack-security-enabled-true-does-not-work-with-docker-compose/290389)._
