history

  • 用法
  1. Usage: docker history [OPTIONS] IMAGE
  2. Show the history of an image
  3. -H, --human=true Print sizes and dates in human readable format
  4. --help=false Print usage
  5. --no-trunc=false Don't truncate output
  6. -q, --quiet=false Only show numeric IDs
  • 例子
  1. $ sudo docker history postgres
  2. IMAGE CREATED CREATED BY SIZE COMMENT
  3. 730d1d72bda2 4 weeks ago /bin/sh -c #(nop) CMD ["postgres"] 0 B
  4. 3e840dbb5474 4 weeks ago /bin/sh -c #(nop) EXPOSE 5432/tcp 0 B
  5. 4df8a54cf33a 4 weeks ago /bin/sh -c #(nop) ENTRYPOINT &{["/docker-entr 0 B
  6. 09e02a9f8afe 4 weeks ago /bin/sh -c #(nop) COPY file:090d83d34addb45c3 2.761 kB
  7. 39172f8b90f2 4 weeks ago /bin/sh -c #(nop) VOLUME [/var/lib/postgresql 0 B
  8. 3fa84fbfdec9 4 weeks ago /bin/sh -c #(nop) ENV PGDATA=/var/lib/postgre 0 B
  9. c5d75e7f9094 4 weeks ago /bin/sh -c #(nop) ENV PATH=/usr/lib/postgresq 0 B
  10. a95070c23e86 4 weeks ago /bin/sh -c mkdir -p /var/run/postgresql && ch 0 B
  11. 64957633c267 4 weeks ago /bin/sh -c apt-get update && apt-get install 116.4 MB
  12. a814508841fa 4 weeks ago /bin/sh -c echo 'deb http://apt.postgresql.or 66 B
  13. 49915906faae 4 weeks ago /bin/sh -c #(nop) ENV PG_VERSION=9.4.4-1.pgdg 0 B
  14. b41b53da5fba 4 weeks ago /bin/sh -c #(nop) ENV PG_MAJOR=9.4 0 B
  15. 02fa71f1fa38 4 weeks ago /bin/sh -c apt-key adv --keyserver ha.pool.sk 3.212 kB
  16. 0b82f508e063 4 weeks ago /bin/sh -c mkdir /docker-entrypoint-initdb.d 0 B
  17. e07b5a739ed9 4 weeks ago /bin/sh -c #(nop) ENV LANG=en_US.utf8 0 B
  18. c783ebe7a1d4 4 weeks ago /bin/sh -c apt-get update && apt-get install 19.54 MB
  19. 8b6b2a3b7f9c 4 weeks ago /bin/sh -c apt-get update && apt-get install 3.758 MB
  20. 22ed955cce18 5 weeks ago /bin/sh -c gpg --keyserver pool.sks-keyserver 98.87 kB
  21. 26a84c436db4 5 weeks ago /bin/sh -c groupadd -r postgres && useradd -r 330.4 kB
  22. 9a61b6b1315e 5 weeks ago /bin/sh -c #(nop) CMD ["/bin/bash"] 0 B
  23. 902b87aaaec9 5 weeks ago /bin/sh -c #(nop) ADD file:e1dd18493a216ecd0c 125.2 MB
  • 总结

打印指定Image中每一层Image命令行的历史记录。