# Elk running on docker

**URL:** <https://discuss.elastic.co/t/elk-running-on-docker/221974>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [March 4, 2020, 3:04am UTC](https://discuss.elastic.co/t/elk-running-on-docker/221974 "2020-03-04T03:04:57Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![alxfernando](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@alxfernando](https://discuss.elastic.co/u/alxfernando)\
**Post date:** [March 4, 2020, 3:04am UTC](https://discuss.elastic.co/t/elk-running-on-docker/221974/1 "2020-03-04T03:04:57Z")

</div>

Hi  
I have created a log analysis environment using elastisearch, kibana and logstash running on docker, but each tool in a container, now I need to put the 3 tools in a single docker container, I have seen the elastic documentation and they are only in separate containers .  
thanks you

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [March 4, 2020, 4:02am UTC](https://discuss.elastic.co/t/elk-running-on-docker/221974/2 "2020-03-04T04:02:32Z")

</div>

You will need to build a custom container for that, that's outside the scope of what we can help with here sorry.

---

<div class="post-metadata">

**Author:** ![alxfernando](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@alxfernando](https://discuss.elastic.co/u/alxfernando)\
**Post date:** [March 4, 2020, 5:14am UTC](https://discuss.elastic.co/t/elk-running-on-docker/221974/3 "2020-03-04T05:14:53Z")

</div>

Where can I get help?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [March 4, 2020, 5:42am UTC](https://discuss.elastic.co/t/elk-running-on-docker/221974/4 "2020-03-04T05:42:56Z")

</div>

As you mention we have a container per product and not a monolithic one, so I am not 100% sure on how to go about this myself.

Maybe on a docker forum?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 4, 2020, 6:16am UTC](https://discuss.elastic.co/t/elk-running-on-docker/221974/5 "2020-03-04T06:16:15Z")

</div>

I don't think that's what Docker is supposed to do. You normally run one service per container.

But if you want to start multiple containers all together, I'd look at docker-compose.

Like:

Here is how I'm setting that with docker compose ( `docker-compose.yml`):

```auto
---
version: '3'
services:

  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:$ELASTIC_VERSION
    environment:
      - bootstrap.memory_lock=true
      - discovery.type=single-node
      - "ES_JAVA_OPTS=-Xms2g -Xmx2g"
      - ELASTIC_PASSWORD=$ELASTIC_PASSWORD
      - xpack.security.enabled=$ELASTIC_SECURITY
    ulimits:
      memlock:
        soft: -1
        hard: -1
    ports:
      - 9200:9200
    networks: ['stack']

  kibana:
    image: docker.elastic.co/kibana/kibana:$ELASTIC_VERSION
    environment:
      - ELASTICSEARCH_USERNAME=elastic
      - ELASTICSEARCH_PASSWORD=$ELASTIC_PASSWORD
    ports: ['5601:5601']
    networks: ['stack']
    links: ['elasticsearch']
    depends_on: ['elasticsearch']

networks:
  stack: {}

```

`.env` file is:

```auto
ELASTIC_VERSION=7.6.0
ELASTIC_SECURITY=true
ELASTIC_PASSWORD=changeme

```

---

<div class="post-metadata">

**Author:** ![alxfernando](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@alxfernando](https://discuss.elastic.co/u/alxfernando)\
**Post date:** [March 4, 2020, 6:32am UTC](https://discuss.elastic.co/t/elk-running-on-docker/221974/6 "2020-03-04T06:32:48Z")

</div>

Yes, it is what I want to do, run all the containers and link them with filebeat, which is the one that collects the logs

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [March 4, 2020, 6:43am UTC](https://discuss.elastic.co/t/elk-running-on-docker/221974/7 "2020-03-04T06:43:29Z")

</div>

Oh, well in that case look at [https://github.com/elastic/stack-docker](https://github.com/elastic/stack-docker)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 1, 2020, 6:43am UTC](https://discuss.elastic.co/t/elk-running-on-docker/221974/8 "2020-04-01T06:43:31Z")

</div>

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