chadoe/docker-cleanup-volumes

Template parsing error

Closed this issue · 3 comments

Template parsing error: template: :1:23: executing "" at <.Volumes>: map has no entry for key "Volumes"
Template parsing error: template: :1:23: executing "" at <.Volumes>: map has no entry for key "Volumes"
Template parsing error: template: :1:23: executing "" at <.Volumes>: map has no entry for key "Volumes"
Template parsing error: template: :1:23: executing "" at <.Volumes>: map has no entry for key "Volumes"

Delete unused volume directories from /var/lib/docker/volumes
In use 64827c5ad81d0d94274364621394df01967664b4ece2f909bb4b72cb535aecae

Directory /var/lib/docker/vfs/dir does not exist or is empty, skipping.
docker version
Client:
 Version:      1.10.3
 API version:  1.22
 Go version:   go1.5.3
 Git commit:   20f81dd
 Built:        Thu Mar 10 15:54:52 2016
 OS/Arch:      linux/amd64

Server:
 Version:      1.10.3
 API version:  1.22
 Go version:   go1.5.3
 Git commit:   20f81dd
 Built:        Thu Mar 10 15:54:52 2016
 OS/Arch:      linux/amd64

Same issue here Template parsing error: template: :1:23: executing "" at <.Volumes>: map has no entry for key "Volumes"

Docker version 1.10.2, build c3959b1

@chadoe
I'm still getting this issue:
Template parsing error: template: :1:2: executing "" at <.Volumes>: map has no entry for key "Volumes"

Docker Version 1.12.0, build 8eab29e

Looks like there is a difference in the output of tree structure of the inspect command across versions:
try:
docker inspect -f '{{.Config.Volumes}}' <CONTAINER_ID>
or
docker inspect -f '{{.HostConfig.Binds}}' <CONTAINER_ID