[英]docker entrypoint.sh not have the permission of root
Dockerfile
FROM ubuntu:18.04
ADD entrypoint.sh /usr/local/bin/
RUN chown root:root /usr/local/bin/entrypoint.sh
RUN chmod 4755 /usr/local/bin/entrypoint.sh
ENTRYPOINT ["entrypoint.sh"]
入口点.sh
#!/usr/bin/env bash
ulimit -n 5000000
docker build -t test .
docker run -it --rm --name testE test bash
结果:/usr/local/bin/entrypoint.sh:第3行:ulimit:打开文件:无法修改限制:不允许操作
如何解决问题?
你可以在参数中做到这一点
docker run -it --ulimit nofile=1024:1024 --rm --name testE test bash
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.