Permission issues with own built Docker container with Elasticsearch 2.1

拈花ヽ惹草 提交于 2019-12-23 17:23:05

问题


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

回答1:


chmod +x docker-entrypoint.sh

You need the script to be executable. Then build and run.



来源:https://stackoverflow.com/questions/33957312/permission-issues-with-own-built-docker-container-with-elasticsearch-2-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!