# Dockerfile for elastic (unable to copy file)

**URL:** <https://discuss.elastic.co/t/dockerfile-for-elastic-unable-to-copy-file/282681>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [August 27, 2021, 2:52pm UTC](https://discuss.elastic.co/t/dockerfile-for-elastic-unable-to-copy-file/282681 "2021-08-27T14:52:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![selin](https://avatars.discourse-cdn.com/v4/letter/s/9de053/32.png) [@selin](https://discuss.elastic.co/u/selin)\
**Post date:** [August 27, 2021, 2:52pm UTC](https://discuss.elastic.co/t/dockerfile-for-elastic-unable-to-copy-file/282681/1 "2021-08-27T14:52:40Z")

</div>

i want to use elastic image such as elasticserhc, kibana and logstash. Do I need specify the CMD or COPY just sufficient? Can I use custom service name and image name or any format needed

```auto

ARG Version

FROM docker.elastic.co/elasticsearch/elasticsearch:$Version

COPY ../configuration/elasticsearch.yml /usr/share/elasticsearch/configuration/

```

I just try this but it is not working. It not copy the file. Please advice if i did anything wrong?

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [August 30, 2021, 11:18am UTC](https://discuss.elastic.co/t/dockerfile-for-elastic-unable-to-copy-file/282681/2 "2021-08-30T11:18:11Z")

</div>

can you share more error messages than 'is not working' in order to dig into the issue? Thank you!

---

<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:** [September 27, 2021, 11:18am UTC](https://discuss.elastic.co/t/dockerfile-for-elastic-unable-to-copy-file/282681/3 "2021-09-27T11:18:21Z")

</div>

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