# Dockerfile for new beats

**URL:** <https://discuss.elastic.co/t/dockerfile-for-new-beats/86067>\
**Category:** Beats\
**Tags:** beats-development\
**Created:** [May 17, 2017, 8:26am UTC](https://discuss.elastic.co/t/dockerfile-for-new-beats/86067 "2017-05-17T08:26:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![BeLi4L](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/beli4l/32/18303_2.png) [@BeLi4L](https://discuss.elastic.co/u/BeLi4L)\
**Post date:** [May 17, 2017, 8:26am UTC](https://discuss.elastic.co/t/dockerfile-for-new-beats/86067/1 "2017-05-17T08:26:06Z")

</div>

Hi 😃

I'm creating a custom beat thanks to your [Developer Guide](https://www.elastic.co/guide/en/beats/libbeat/current/new-beat.html), and would like to package it into a **Docker image**.

I looked at the existing community beats, and found several ways of writing a Dockerfile to build an image for my beat. However, the quality of the resulting Docker images doesn't come close to what you have done for your official beats (e.g. metricbeat): size of image, internal directory structure, etc.

Therefore I'm wondering: this Dockerfile could be automatically generated for new beats, couldn't it? For instance, we could have some `make Dockerfile` command to generate the Dockerfile, which would build and package the beat binary in a clean Docker image.

What do you think? 🤔

Cheers

---

<div class="post-metadata">

**Author:** ![exekias](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/exekias/32/28718_2.png) [@exekias](https://discuss.elastic.co/u/exekias)\
**Post date:** [May 17, 2017, 8:33am UTC](https://discuss.elastic.co/t/dockerfile-for-new-beats/86067/2 "2017-05-17T08:33:49Z")

</div>

We already have our Dockerfile images published, check [https://github.com/elastic/beats-docker](https://github.com/elastic/beats-docker) repo, we use a Makefile for that, although it's not straight forward it's a good start to try to adapt your case.

Let us know if you find any issue while doing it!

---

<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:** [June 14, 2017, 8:34am UTC](https://discuss.elastic.co/t/dockerfile-for-new-beats/86067/3 "2017-06-14T08:34:08Z")

</div>

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