Docker Community Forums

Share and learn in the Docker community.

Can't map docker overlay diff to container

I keep getting a k8s worker node flagged for an outdated version of JDK(of course). It’s a in /var/lib/docker/overlay2/xxxxx/diff. I wrote this script to identify which container it is based on the overlay str/hash:

#!/bin/bash

read -p 'Overlay hash: ' overlayHash

docker inspect -f $'{{.Name}}\t{{.GraphDriver.Data}}' $(docker ps -aq) | grep $overlayHash | awk '{ print $1 }'

Until now this has worked, but for some reason it’s like it’s launching the container and creating this overlay without a trace. Like it’s pruning the containers and leaving the overlay. Does docker/k8s have logging for container to overlay mapping? Anybody have any suggestions? Thanks.