错误 13: Permission denied
[root@VM-32-11-tencentos ~]# docker exec -it kibana1 /bin/bash
kibana@76c20c215dcb:~$ apt-get install vi
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
解决办法
登录容器时,使用-u 0
参数:文章来源:https://www.toymoban.com/news/detail-642746.html
docker exec -u 0 -it 容器名称 /bin/bash
举例:文章来源地址https://www.toymoban.com/news/detail-642746.html
docker exec -u 0 -it redis1 /bin/bash
到了这里,关于docker 容器中执行命令出现错误: 13: Permission denied的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!