The docker inspect command can be very useful for getting the labels on a Docker image:
# -*- Dockerfile -*- FROM busybox LABEL foo=\"bar\" LABEL com.whereve
The index function is what I was looking for. It can lookup arbitrary strings in the map.
index
$ docker inspect -f '{{ index .Config.Labels "com.wherever.foo" }}' foo bang