# Custom Docker Image for custom Kibana Source

**URL:** <https://discuss.elastic.co/t/custom-docker-image-for-custom-kibana-source/159163>\
**Category:** Kibana\
**Tags:** docker\
**Created:** [December 3, 2018, 12:04pm UTC](https://discuss.elastic.co/t/custom-docker-image-for-custom-kibana-source/159163 "2018-12-03T12:04:15Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jagadeesh\_ctm](https://avatars.discourse-cdn.com/v4/letter/j/e495f1/32.png) [@Jagadeesh\_ctm](https://discuss.elastic.co/u/Jagadeesh_ctm)\
**Post date:** [December 3, 2018, 12:04pm UTC](https://discuss.elastic.co/t/custom-docker-image-for-custom-kibana-source/159163/1 "2018-12-03T12:04:16Z")

</div>

Hii,

I have a custom source code of kibana with lots of modifications and UI updates . I want to create a custom docker file to generate a build and copy my custom plugins to the build folder and make it ready for deployment in my AWS. can anyone help me how to write the docker file . I am really new to the docker

---

<div class="post-metadata">

**Author:** ![tylersmalley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tylersmalley/32/8833_2.png) [@tylersmalley](https://discuss.elastic.co/u/tylersmalley)\
**Post date:** [December 4, 2018, 12:59am UTC](https://discuss.elastic.co/t/custom-docker-image-for-custom-kibana-source/159163/2 "2018-12-04T00:59:43Z")

</div>

Our Docker builds are created from [here](https://github.com/elastic/kibana-docker). In the coming months, this will be moved to the Kibana repository and will just be part of the normal build process.

---

<div class="post-metadata">

**Author:** ![Jagadeesh\_ctm](https://avatars.discourse-cdn.com/v4/letter/j/e495f1/32.png) [@Jagadeesh\_ctm](https://discuss.elastic.co/u/Jagadeesh_ctm)\
**Post date:** [December 4, 2018, 5:55am UTC](https://discuss.elastic.co/t/custom-docker-image-for-custom-kibana-source/159163/3 "2018-12-04T05:55:20Z")

</div>

How can i route the process to my custom kibana source which is saved in my local machine  
Is there any tutorial or docs available?

---

<div class="post-metadata">

**Author:** ![jarpy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jarpy/32/51290_2.png) [@jarpy](https://discuss.elastic.co/u/jarpy)\
**Post date:** [December 4, 2018, 11:57pm UTC](https://discuss.elastic.co/t/custom-docker-image-for-custom-kibana-source/159163/4 "2018-12-04T23:57:40Z")

</div>

Which version of Kibana are you working on? We just replaced the build system in the master branch. Let me know which version you are working with and I'll put together a recipe that will work for you.

---

<div class="post-metadata">

**Author:** ![Jagadeesh\_ctm](https://avatars.discourse-cdn.com/v4/letter/j/e495f1/32.png) [@Jagadeesh\_ctm](https://discuss.elastic.co/u/Jagadeesh_ctm)\
**Post date:** [December 5, 2018, 6:08am UTC](https://discuss.elastic.co/t/custom-docker-image-for-custom-kibana-source/159163/5 "2018-12-05T06:08:29Z")

</div>

I am working on Kibana 6.4.2

---

<div class="post-metadata">

**Author:** ![jarpy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jarpy/32/51290_2.png) [@jarpy](https://discuss.elastic.co/u/jarpy)\
**Post date:** [December 6, 2018, 2:20am UTC](https://discuss.elastic.co/t/custom-docker-image-for-custom-kibana-source/159163/6 "2018-12-06T02:20:42Z")

</div>

OK, cool. Here's what I did for version 6.4.4:

- Cloned the Kibana repository to `/home/jarpy/src/kibana`
- Checked out the `6.4` branch
- Built Kibana with:
  - `nvm install`
  - `nvm use`
  - `yarn kbn bootstrap`
  - `yarn build --skip-os-packages --release`

- Cloned the [kibana-docker](https://github.com/elastic/kibana-docker) repository
- Checked out the `6.4` branch
- Built the images with: `env ARTIFACTS_DIR=/home/jarpy/src/ ELASTIC_VERSION=6.4.4 make release-manager-release`

---

<div class="post-metadata">

**Author:** ![Jagadeesh\_ctm](https://avatars.discourse-cdn.com/v4/letter/j/e495f1/32.png) [@Jagadeesh\_ctm](https://discuss.elastic.co/u/Jagadeesh_ctm)\
**Post date:** [December 6, 2018, 6:25am UTC](https://discuss.elastic.co/t/custom-docker-image-for-custom-kibana-source/159163/7 "2018-12-06T06:25:31Z")

</div>

Thank you for the reply

Can you please help me how to write the docker file for this ?  
Can you provide me a sample so that i can use it as a reference

---

<div class="post-metadata">

**Author:** ![jarpy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jarpy/32/51290_2.png) [@jarpy](https://discuss.elastic.co/u/jarpy)\
**Post date:** [December 6, 2018, 10:34pm UTC](https://discuss.elastic.co/t/custom-docker-image-for-custom-kibana-source/159163/8 "2018-12-06T22:34:56Z")

</div>

You're welcome.

There's no need to write a Dockerfile. The build process I provided will generate it for you from [the template](https://github.com/elastic/kibana-docker/blob/6.4/templates/Dockerfile.j2).

---

<div class="post-metadata">

**Author:** ![Jagadeesh\_ctm](https://avatars.discourse-cdn.com/v4/letter/j/e495f1/32.png) [@Jagadeesh\_ctm](https://discuss.elastic.co/u/Jagadeesh_ctm)\
**Post date:** [January 2, 2019, 11:25am UTC](https://discuss.elastic.co/t/custom-docker-image-for-custom-kibana-source/159163/10 "2019-01-02T11:25:35Z")

</div>

I am able to create the docker image sucessfully . But i have some doubts

1. How can i specify my custom elasticsearch url to this ?
2. How can i copy or use my custom plugins which is inside plugins folder for the docker image

---

<div class="post-metadata">

**Author:** ![jarpy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jarpy/32/51290_2.png) [@jarpy](https://discuss.elastic.co/u/jarpy)\
**Post date:** [January 3, 2019, 2:26am UTC](https://discuss.elastic.co/t/custom-docker-image-for-custom-kibana-source/159163/12 "2019-01-03T02:26:45Z")

</div>

> How can i specify my custom elasticsearch url to this ?

There are [multiple ways to configure Kibana running as a container](https://www.elastic.co/guide/en/kibana/6.4/docker.html#configuring-kibana-docker). Generally, bind-mounted configuration is a good choice.

> How can i copy or use my custom plugins which is inside plugins folder for the docker image

Perhaps modify the [Dockerfile template](https://github.com/elastic/kibana-docker/blob/master/.tedi/template/Dockerfile.j2) to include them, then rebuild.

---

<div class="post-metadata">

**Author:** ![Jagadeesh\_ctm](https://avatars.discourse-cdn.com/v4/letter/j/e495f1/32.png) [@Jagadeesh\_ctm](https://discuss.elastic.co/u/Jagadeesh_ctm)\
**Post date:** [January 3, 2019, 6:25am UTC](https://discuss.elastic.co/t/custom-docker-image-for-custom-kibana-source/159163/13 "2019-01-03T06:25:55Z")

</div>

Actually I am new to this Docker things. Can you please give me a sample code snippet to add custom plugins or the entire plugins folder of the kibana , so that i can use that as a reference.

---

<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:** [January 31, 2019, 6:26am UTC](https://discuss.elastic.co/t/custom-docker-image-for-custom-kibana-source/159163/14 "2019-01-31T06:26:03Z")

</div>

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