系统CPU架构版本:X86
系统版本:1.2.0201
设备环境:虚拟机
BUG现象:在升级到权限ACL 1.2.0201 重构之后,创建的Docker容器下/etc/resolv.conf /etc/hosts /etc/hostname 权限被改成了710,预期应该是644,这会导致容器内依赖于读取DNS配置的进程不能正常获取到DNS进而访问国内外网站失败
出现频率:必现
docker配置文件:
sudo cat /etc/docker/daemon.json | jq .
{
"data-root": "/vol1/docker",
"live-restore": true,
"log-driver": "json-file",
"log-opts": {
"max-file": "5",
"max-size": "100m"
},
"proxies": {},
"registry-mirrors": [
"https://docker.fnnas.com",
"https://registry.hub.docker.com"
]
}
复现步骤:以searxng镜像为例
1、停止所有依赖于searxng的容器
2、删除searxng相关的镜像
3、重新拉取searxng:latest镜像:searxng/searxng:latest
4、启动searxng容器
5、执行命令查看容器内文件权限属性
sudo docker exec searxng \
stat -c '%a %U:%G %n' \
/etc/resolv.conf /etc/hosts /etc/hostname
710 root:root /etc/resolv.conf
710 root:root /etc/hosts
710 root:root /etc/hostname