# How to build a docker image with kibana-docker and the kibana source code

**URL:** <https://discuss.elastic.co/t/how-to-build-a-docker-image-with-kibana-docker-and-the-kibana-source-code/123005>\
**Category:** Kibana\
**Created:** [March 8, 2018, 5:22am UTC](https://discuss.elastic.co/t/how-to-build-a-docker-image-with-kibana-docker-and-the-kibana-source-code/123005 "2018-03-08T05:22:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![596375269](https://avatars.discourse-cdn.com/v4/letter/5/e495f1/32.png) [@596375269](https://discuss.elastic.co/u/596375269)\
**Post date:** [March 8, 2018, 5:22am UTC](https://discuss.elastic.co/t/how-to-build-a-docker-image-with-kibana-docker-and-the-kibana-source-code/123005/1 "2018-03-08T05:22:05Z")

</div>

Hello.  
I noticed there are two repos in github for kibana.

> **[elastic/kibana](https://github.com/elastic/kibana)**
>
> kibana - :bar\_chart: Kibana analytics and search dashboard for Elasticsearch

  

> **[elastic/kibana-docker](https://github.com/elastic/kibana-docker)**
>
> kibana-docker - Official Kibana Docker image

I think the second repository are used to build docker mirrors from the first repository.

How should I build the image?

Thanks

---

<div class="post-metadata">

**Author:** ![596375269](https://avatars.discourse-cdn.com/v4/letter/5/e495f1/32.png) [@596375269](https://discuss.elastic.co/u/596375269)\
**Post date:** [March 8, 2018, 8:38am UTC](https://discuss.elastic.co/t/how-to-build-a-docker-image-with-kibana-docker-and-the-kibana-source-code/123005/2 "2018-03-08T08:38:33Z")

</div>

I have found out.  
It is simple.  
just exec "make"😅

---

<div class="post-metadata">

**Author:** ![596375269](https://avatars.discourse-cdn.com/v4/letter/5/e495f1/32.png) [@596375269](https://discuss.elastic.co/u/596375269)\
**Post date:** [March 8, 2018, 1:17pm UTC](https://discuss.elastic.co/t/how-to-build-a-docker-image-with-kibana-docker-and-the-kibana-source-code/123005/3 "2018-03-08T13:17:28Z")

</div>

Another question.

To build a docker image, a zipped package is needed. for example, [https://artifacts.elastic.co/downloads/kibana/kibana-6.1.3-linux-x86\_64.tar.gz](https://artifacts.elastic.co/downloads/kibana/kibana-6.1.3-linux-x86_64.tar.gz)

How can i get the zipped file by kibana source code?

> **[elastic/kibana](https://github.com/elastic/kibana)**
>
> kibana - :bar\_chart: Kibana analytics and search dashboard for Elasticsearch

  
I have tried to execute "grunt release" to build. I donot know if this is right.

And unfortunately, I got a error at the "run:optimizeBuild" stage

'''

Running "run:optimizeBuild" (run) task  
Warning: non-zero exit code 1 Used --force, continuing.

'''

Could anyone help me ?

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [March 8, 2018, 6:30pm UTC](https://discuss.elastic.co/t/how-to-build-a-docker-image-with-kibana-docker-and-the-kibana-source-code/123005/4 "2018-03-08T18:30:38Z")

</div>

Hello, this is the guide on building the OS packages for Kibana:

> <https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#building-os-packages>

If you don't want the headache and you don't have any customizations build in your own Kibana repo, you can just use our docker images which are listed here: [https://www.docker.elastic.co/](https://www.docker.elastic.co/)

---

<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 5, 2018, 6:30pm UTC](https://discuss.elastic.co/t/how-to-build-a-docker-image-with-kibana-docker-and-the-kibana-source-code/123005/5 "2018-04-05T18:30:58Z")

</div>

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