title: Permission issues with own built Docker container with Elasticsearch 2.1
body: <p>When I pull an image from public elasticsearch repo, spawning container with that pulled image is working fine for me with no permission issues.</p>
  
  <pre><code>docker pull elasticsearch
  
  docker run -d elasticsearch
  </code></pre>
  
  <p>But when I spawn a container with the Dockerfile which is available there with the public repo gives me permission issues. I do have a same directory structure as public repo.</p>
  
  <pre><code>myfolder/Dockerfile
  
  myfolder/docker-entrypoint.sh
  
  myfolder/config/elasticsearch.yml
  
  myfolder/config/logging.yml
  
  
  https://github.com/docker-library/elasticsearch/tree/0d393d9a0a2e24fca022a89ad10c7050b2925292/2.1
  </code></pre>
  
  <p>Commands:-
  1) To build an image with the Dockerfile</p>
  
  <pre><code>sudo docker build -t testuser/testelastic:v1 .
  </code></pre>
  
  <p>2) Spawn container out of the built image</p>
  
  <pre><code>sudo docker run -d --name elastic -v ./config:/config testuser/testelastic:v1
  </code></pre>
  
  <p>But it gives me following error everytime when I tried to spawn any container out of the above custom build image.</p>
  
  <pre><code>Error response from daemon: Cannot start container 8e72f3c33d054f5883b2de9e7673bc032333e633e3f43905d7d22a12ea76ad04: [8] System error: exec: "/docker-entrypoint.sh": permission denied
  </code></pre>