: map has no entry for key "Volumes"">

报错如下: Template parsing error: template: :1:2: executing "" at <.Volumes>: map has no entry for key "Volumes"

redis master 主数据库容器节点配置

sudo docker inspect --format "{{ .Volumes }}" bc8e

报错如下: Template parsing error: template: :1:2: executing "" at <.Volumes>: map has no entry for key "Volumes"

有建议使用 {{ .Config.Volumes }}

sudo docker inspect --format "{{ .Config.Volumes }}" bc8e

输出 map[/data:{}]
grep大法好

sudo docker inspect bc8e | grep Source

"Source": "/var/lib/docker/volumes/xxxxxxx/_data"
之后需要 root 权限, ubuntu 的 sudo cd 会报错, 因为 cd 是 alias

sudo -s
cd /var/lib/docker/volumes/xxxxxxx/_data
cp 你的redis文件夹/redis.conf .
vim redis.conf

你可能感兴趣的:(报错如下: Template parsing error: template: :1:2: executing "" at <.Volumes>: map has no entry for key "Volumes")