从docker文件上读取ETC/主机文件可读取
当我不断修改它时,我想在Docker中修改权限等/主机文件。我想让特定的用户具有访问权限或在其上具有744访问权限。我尝试在Docker文件中关注。
USE root
RUN chown <user>:<group> /etc/hosts
USE root
RUN chmod 777 /etc/hosts
但是,这不起作用,并给出一个例外,说ETC/主机是可读的,因此无法更改许可。
I want to modify permissions etc/hosts file in docker as I am continuously modifying it. I want to make particular user have the access or have the 744 access on it. I tried following in docker file.
USE root
RUN chown <user>:<group> /etc/hosts
USE root
RUN chmod 777 /etc/hosts
However this doesn't work and throws an exception on saying that etc/host is readable and hence can't change permission.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论