# Running custom docker image with cloud-on-k8s operator

**URL:** <https://discuss.elastic.co/t/running-custom-docker-image-with-cloud-on-k8s-operator/215036>\
**Category:** Elasticsearch\
**Created:** [January 14, 2020, 7:27pm UTC](https://discuss.elastic.co/t/running-custom-docker-image-with-cloud-on-k8s-operator/215036 "2020-01-14T19:27:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sarthakn](https://avatars.discourse-cdn.com/v4/letter/s/a8b319/32.png) [@sarthakn](https://discuss.elastic.co/u/sarthakn)\
**Post date:** [January 14, 2020, 7:27pm UTC](https://discuss.elastic.co/t/running-custom-docker-image-with-cloud-on-k8s-operator/215036/1 "2020-01-14T19:27:10Z")

</div>

I'm trying to use the cloud-on-k8s operator to deploy ES on k8s. However, I need to use a different docker image as I need to use Ubuntu instead of CentOS for compatibility with some of our packages and I also need to use debian packaged ES to be compatible with our current plugin deployment workflow.  
I was able to create an ES docker image that satisfies both of the above criteria (runs Ubuntu and uses deb packaged ES), however I had some questions:

1. The operator requires the Elastic license file to be present in /usr/share/elasticsearch ([https://github.com/elastic/cloud-on-k8s/blob/1.0-beta/pkg/controller/elasticsearch/initcontainer/prepare\_fs\_script.go#L61](https://github.com/elastic/cloud-on-k8s/blob/1.0-beta/pkg/controller/elasticsearch/initcontainer/prepare_fs_script.go#L61)), however the license file is not present in the debian distribution of ES. Is it alright if I add the license to the directory ourselves ? Is it fine to use the debian distribution with the Elastic operator (even if unsupported) ?

2. I am using the docker-entrypoint file ([https://github.com/elastic/dockerfiles/blob/7.5/elasticsearch/bin/docker-entrypoint.sh](https://github.com/elastic/dockerfiles/blob/7.5/elasticsearch/bin/docker-entrypoint.sh)) in my Dockerfile as well, without any modifications. Am I allowed to do this ?

3.I'm also curious as to why Elastic decided to cover even Dockerfiles under Elastic license. This adds a lot of complications for us (in addition to the operator under Elastic license complicating things) even though we are just using it for internal purposes only.

---

<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:** [February 11, 2020, 7:27pm UTC](https://discuss.elastic.co/t/running-custom-docker-image-with-cloud-on-k8s-operator/215036/2 "2020-02-11T19:27:12Z")

</div>

Closed on February 11, 2020, 7:27pm UTC

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