When I pull an image from public elasticsearch repo, spawning container with that pulled image is working fine for me with no permission issues.
docker pull elasticsearch
docker run -d elasticsearch
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.
myfolder/Dockerfile
myfolder/docker-entrypoint.sh
myfolder/config/elasticsearch.yml
myfolder/config/logging.yml
https://github.com/docker-library/elasticsearch/tree/0d393d9a0a2e24fca022a89ad10c7050b2925292/2.1
Commands:- 1) To build an image with the Dockerfile
sudo docker build -t testuser/testelastic:v1 .
2) Spawn container out of the built image
sudo docker run -d --name elastic -v ./config:/config testuser/testelastic:v1
But it gives me following error everytime when I tried to spawn any container out of the above custom build image.
Error response from daemon: Cannot start container 8e72f3c33d054f5883b2de9e7673bc032333e633e3f43905d7d22a12ea76ad04: [8] System error: exec: "/docker-entrypoint.sh": permission denied