dockerdocker-composedocker-machinedocker-registry

How can I check when was a docker image pulled?


I want to know when I pulled a certain image, when you run docker images The Created field appear but the date that the image was pulled don't.


Solution

  • If you installed docker-engine from official repositories on your linux, it should be installed in /var/lib/docker, for your own configuration, find the respective path.

    There is /var/lib/docker/image/aufs/repositories.json file where docker stores images with their sha256 values.

    cat /var/lib/docker/image/aufs/repositories.json
    

    Find the image you are looking after and copy its sha256 hash somewhere.

    Then:

    ls /var/lib/docker/image/aufs/imagedb/content/sha256 -lash 
    

    Find the sha265 value you found in repositories.json then look at the date.