docker 加载 volumes 的问题?
PHP中文网
PHP中文网 2017-04-27 09:01:35
0
3
996
#执行
sudo docker run -d -p 81:80 -v /root/php:/root/php --name <tag> image-name

启动镜像 Mount container volumes 的时候在logs里看到

chown: /var/www/html: Permission denied

请问这个要怎么解决?查了查帖子说是要修改uid,可是怎么容器里root和主机的root,uid都是0呀~

#查询方法
id root
PHP中文网
PHP中文网

认证0级讲师

reply all(3)
某草草

I have successfully configured shared volumes using this tutorial, which is available for reference.

大家讲道理

chmod 777 /var/www/html

習慣沉默

Check if selinux is turned off.
I mounted the host directory into the mysql container, but it failed after a few days. After turning off selinux, it succeeded.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template