zookeeper-docker icon indicating copy to clipboard operation
zookeeper-docker copied to clipboard

container start failed: /docker-entrypoint.sh: permission denied:unknown

Open yuezhongtao opened this issue 2 years ago • 1 comments

Before you file an issue here, please keep in mind that your issue may be not related to the image itself. Please make sure that it is, otherwise report the issue upstream.

Expected behavior

container start success. Tell us what should happen.

Actual behavior

Tell us what happens instead. 企业微信截图_02cf203c-87d9-400a-b214-331eee57d958

Steps to reproduce the behavior

  • build zookeeper 3.8.0 image on local machine
  • start container instance with default config
  • start failed

Tell us how to reproduce the issue.

System configuration

Please include as much relevant information as possible.

yuezhongtao avatar Apr 22 '22 02:04 yuezhongtao

I have figured out the cause of the problem, docker packaging will not change the permissions of the file. It is because my local newly created docker-entrypoint.sh does not have executable permission. i think dockerfile can be hardened.

yuezhongtao avatar Apr 22 '22 06:04 yuezhongtao

While it's possible to add RUN chmod +x /docker-entrypoint.sh into the Dockerfile I don't think it's worth an extra image layer. If you're building the image using a newly created docker-entrypoint.sh please make sure it's executable on the host.

31z4 avatar Jan 19 '23 08:01 31z4