Docker容器内的权限被拒绝 [英] Permission denied inside Docker container
本文介绍了Docker容器内的权限被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个开始的容器 gigantic_booth
,我想创建目录 / etc / test
:
I have a started container gigantic_booth
and I want to create the directory /etc/test
:
# docker exec -it gigantic_booth /bin/bash
$ mkdir /etc/test
$ mkdir: cannot create directory '/etc/test': Permission denied
和 sudo
命令未找到。我不想在图像构建时创建此目录,但一旦启动。
And sudo
command is not found. I don't want to create this directory in image-build-time but once is started.
我该怎么办?
感谢:)
推荐答案
或者只是使用 docker exec -u thejenkinsuser
。
这篇关于Docker容器内的权限被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文