docker not have permission to run the executable file to solve

docker run mount main system directory, making it impossible to start configuration error: open /etc/docker/registry/config.yml: permission denied prompt without permission


Tip no authority)

 

Step 1: Check the log

docker logs -t --since 10m containner
显示:
2018-10-09T14:26:56.413262000Z configuration error: open /etc/docker/registry/config.yml: permission denied
2018-10-09T14:26:56.415470000Z Usage:
2018-10-09T14:26:56.415956000Z registry serve [flags]
2018-10-09T14:26:56.416417000Z Flags:
2018-10-09T14:26:56.416905000Z -h, --help=false: help for serve
2018-10-09T14:26:56.418310000Z Additional help topics:

Step two: Resolve Permission Issues

Three ways:
1> Docker RUN = -d -privileged Container to true
running is increased ** - privileged = true ** privilege parameter
2> closed SElinux function
setenforce 0
3> add selinux rules, changing security you want to mount the directory text
modification / soft directory on the host security document
[root @ localhost Desktop] # chcon - Rt svirt_sandbox_file_t / soft
[root @ ba471da26d07 Soft] # LL
Total 384 264
-rw-r-r--. 1 root root 212 046 774 Aug 8 Hadoop-2.7.2.tar.gz 10:01
-rw-R & lt-r--. the root the root. 1 181 435 897 09:23 JDK. 8-Aug-Linux-x64.tar.gz 8u102-
1234567

Source solving method:
https://blog.csdn.net/rznice/article/details/52170085

Guess you like

Origin www.cnblogs.com/Hackerman/p/11843089.html