錯(cuò)誤 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?
解決辦法
登錄容器時(shí),使用-u 0
參數(shù):文章來源:http://www.zghlxwxcb.cn/news/detail-642746.html
docker exec -u 0 -it 容器名稱 /bin/bash
舉例:文章來源地址http://www.zghlxwxcb.cn/news/detail-642746.html
docker exec -u 0 -it redis1 /bin/bash
到了這里,關(guān)于docker 容器中執(zhí)行命令出現(xiàn)錯(cuò)誤: 13: Permission denied的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!