# Docker compose file for v8.16

**URL:** <https://discuss.elastic.co/t/docker-compose-file-for-v8-16/374057>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [February 4, 2025, 10:18am UTC](https://discuss.elastic.co/t/docker-compose-file-for-v8-16/374057 "2025-02-04T10:18:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amol\_Nagotkar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amol_nagotkar/32/124188_2.png) [@Amol\_Nagotkar](https://discuss.elastic.co/u/Amol_Nagotkar)\
**Post date:** [February 4, 2025, 10:18am UTC](https://discuss.elastic.co/t/docker-compose-file-for-v8-16/374057/1 "2025-02-04T10:18:16Z")

</div>

Hi all,

i need docker-compose file for elastic v.8.16.3  
i followed this link -\> [Install Elasticsearch with Docker | Elasticsearch Guide [8.16] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/8.16/docker.html)

tried below compose file-\>

```auto
version: '3.8'

services:
  es01:
    image: docker.elastic.co/elasticsearch/elasticsearch:8.16.3
    container_name: es01
    networks:
      - elastic
    ports:
      - "9200:9200"
    environment:
      - xpack.ml.use_auto_machine_memory_percent=true
    deploy:
      resources:
        limits:
          memory: 6GB
    tty: true # Equivalent to -it (interactive terminal)

networks:
  elastic:
    name: elastic
    external: true

```

container is creating, but not showing below details in logs . **Plus i want to enable SSL also**. **how can i do this in v8.16.3**

```auto
 Elasticsearch security features have been automatically configured!
✅ Authentication is enabled and cluster connections are encrypted.

ℹ️ Password for the elastic user (reset with `bin/elasticsearch-reset-password -u elastic`):
  uJsFD25vo5GTB2aDx44_

ℹ️ HTTP CA certificate SHA-256 fingerprint:
  9c7cfeb2d11ac7bef07f182a12cadcec749686c36e85be115905a93bd8621b17

ℹ️ Configure Kibana to use this cluster:
• Run Kibana and click the configuration link in the terminal when Kibana starts.
• Copy the following enrollment token and paste it into Kibana in your browser (valid for the next 30 minutes):
  eyJ2ZXIiOiI4LjE0LjAiLCJhZHIiOlsiMTkyLjE2OC4zMi4yOjkyMDAiXSwiZmdyIjoiOWM3Y2ZlYjJkMTFhYzdiZWYwN2YxODJhMTJjYWRjZWM3NDk2ODZjMzZlODViZTExNTkwNWE5M2JkODYyMWIxNyIsImtleSI6InJnUGh0cFFCVnRwOHZwMVlaYWVoOlg4SkdrVENoVEdTaU9LVWx0RWFZYlEifQ==

ℹ️ Configure other nodes to join this cluster:
• Copy the following enrollment token and start new Elasticsearch nodes with `bin/elasticsearch --enrollment-token <token>` (valid for the next 30 minutes):
  eyJ2ZXIiOiI4LjE0LjAiLCJhZHIiOlsiMTkyLjE2OC4zMi4yOjkyMDAiXSwiZmdyIjoiOWM3Y2ZlYjJkMTFhYzdiZWYwN2YxODJhMTJjYWRjZWM3NDk2ODZjMzZlODViZTExNTkwNWE5M2JkODYyMWIxNyIsImtleSI6InJBUGh0cFFCVnRwOHZwMVlaYWVMOmR5VkZfSVdOU3JhSVlQVWpyeEpfb2cifQ==

  If you're running in Docker, copy the enrollment token and run:
  `docker run -e "ENROLLMENT_TOKEN=<token>" docker.elastic.co/elasticsearch/elasticsearch:8.16.3`

```

thank you in advance.

---

<div class="post-metadata">

**Author:** ![aurangzeb99](https://avatars.discourse-cdn.com/v4/letter/a/6bbea6/32.png) [@aurangzeb99](https://discuss.elastic.co/u/aurangzeb99)\
**Post date:** [February 4, 2025, 1:11pm UTC](https://discuss.elastic.co/t/docker-compose-file-for-v8-16/374057/2 "2025-02-04T13:11:24Z")

</div>

docker-compose.yml

> <https://github.com/elastic/elasticsearch/blob/8.16/docs/reference/setup/install/docker/docker-compose.yml>

.env

> <https://github.com/elastic/elasticsearch/blob/8.16/docs/reference/setup/install/docker/.env>
