# Combining all beats into a single Docker image

**URL:** <https://discuss.elastic.co/t/combining-all-beats-into-a-single-docker-image/153668>\
**Category:** Beats\
**Created:** [October 23, 2018, 6:58pm UTC](https://discuss.elastic.co/t/combining-all-beats-into-a-single-docker-image/153668 "2018-10-23T18:58:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mhickok](https://avatars.discourse-cdn.com/v4/letter/m/76d3ee/32.png) [@mhickok](https://discuss.elastic.co/u/mhickok)\
**Post date:** [October 23, 2018, 6:58pm UTC](https://discuss.elastic.co/t/combining-all-beats-into-a-single-docker-image/153668/1 "2018-10-23T18:58:32Z")

</div>

Hello all, this is more of a Docker-related question that Beats, but I thought I would see if anyone else tried to do this.

I want my beats image to be as close to the official image as possible, but I want to have all of the beats in a single image.

One way is to modify the dockerfile template and do all of the same steps but for all of the beats. But I was wondering if there is some way to perform a multi-stage docker build using multiple FROM statements (pulling from [docker.elastic.co/beats/metricbeat:6.4.2](http://docker.elastic.co/beats/metricbeat:6.4.2), etc). But when I do this it seems to overwrite what is i the /usr/share directory and whichever is the last FROM statement is the only beat that actually exists in the /user/share dir.

Again, I know this is more docker-specific than beat-specific, but I thought I would just see if anyone else has tackled this before I dive in and make my own custom image combining all of them.

---

<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:** [November 20, 2018, 8:58pm UTC](https://discuss.elastic.co/t/combining-all-beats-into-a-single-docker-image/153668/2 "2018-11-20T20:58:35Z")

</div>

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