I've seen that by examining /proc/self/cgroup from within a container, it's possible to determine the container's ID.
However, what I'd like to do is get information about the docker image from within the container created from that image. Is this possible? (I would like to avoid the socket approach for obvious security reasons.)
The slightly tenuous and questionable motive behind this is that I'd like my API running in the container to be able to report its version, which for me is the image version number, but I don't want to have to hardcode that into the API itself.