I run docker images
and get something like this:
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE docker.io/postgres latest a7d662bede59 2 weeks ago 265.3 MB docker.io/ubuntu latest 91e54dfb1179 2 weeks ago 188.3 MB
Look at CREATED column. I want to know what image created earlier with hours, minutes, seconds. Similar with containers, for command docker ps -a
. How to view exact dates?
I think the best way would be to run docker inspect IMAGE_OR_CONTAINER , then pipe the output to grep to filter the results to what you really want. ... which results in the following output: "Created": "2015-09-18T01:46:51.471641483Z", That's pretty clean.
When a new version comes out, update the tag in your docker-compose. yml , docker-compose pull , and then restart the container ( docker-compose down && docker-compose up -d ). This is simple, and robust, and means nothing will update without you knowing.
The easiest way to list Docker images is to use the “docker images” with no arguments. When using this command, you will be presented with the complete list of Docker images on your system. Alternatively, you can use the “docker image” command with the “ls” argument.
Use docker inspect
:
docker inspect -f '{{ .Created }}' IMAGE_OR_CONTAINER
From: Exact times in "docker ps" and "docker images"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With