- history
history
- 用法
Usage: docker history [OPTIONS] IMAGEShow the history of an image-H, --human=true Print sizes and dates in human readable format--help=false Print usage--no-trunc=false Don't truncate output-q, --quiet=false Only show numeric IDs
- 例子
$ sudo docker history postgresIMAGE CREATED CREATED BY SIZE COMMENT730d1d72bda2 4 weeks ago /bin/sh -c #(nop) CMD ["postgres"] 0 B3e840dbb5474 4 weeks ago /bin/sh -c #(nop) EXPOSE 5432/tcp 0 B4df8a54cf33a 4 weeks ago /bin/sh -c #(nop) ENTRYPOINT &{["/docker-entr 0 B09e02a9f8afe 4 weeks ago /bin/sh -c #(nop) COPY file:090d83d34addb45c3 2.761 kB39172f8b90f2 4 weeks ago /bin/sh -c #(nop) VOLUME [/var/lib/postgresql 0 B3fa84fbfdec9 4 weeks ago /bin/sh -c #(nop) ENV PGDATA=/var/lib/postgre 0 Bc5d75e7f9094 4 weeks ago /bin/sh -c #(nop) ENV PATH=/usr/lib/postgresq 0 Ba95070c23e86 4 weeks ago /bin/sh -c mkdir -p /var/run/postgresql && ch 0 B64957633c267 4 weeks ago /bin/sh -c apt-get update && apt-get install 116.4 MBa814508841fa 4 weeks ago /bin/sh -c echo 'deb http://apt.postgresql.or 66 B49915906faae 4 weeks ago /bin/sh -c #(nop) ENV PG_VERSION=9.4.4-1.pgdg 0 Bb41b53da5fba 4 weeks ago /bin/sh -c #(nop) ENV PG_MAJOR=9.4 0 B02fa71f1fa38 4 weeks ago /bin/sh -c apt-key adv --keyserver ha.pool.sk 3.212 kB0b82f508e063 4 weeks ago /bin/sh -c mkdir /docker-entrypoint-initdb.d 0 Be07b5a739ed9 4 weeks ago /bin/sh -c #(nop) ENV LANG=en_US.utf8 0 Bc783ebe7a1d4 4 weeks ago /bin/sh -c apt-get update && apt-get install 19.54 MB8b6b2a3b7f9c 4 weeks ago /bin/sh -c apt-get update && apt-get install 3.758 MB22ed955cce18 5 weeks ago /bin/sh -c gpg --keyserver pool.sks-keyserver 98.87 kB26a84c436db4 5 weeks ago /bin/sh -c groupadd -r postgres && useradd -r 330.4 kB9a61b6b1315e 5 weeks ago /bin/sh -c #(nop) CMD ["/bin/bash"] 0 B902b87aaaec9 5 weeks ago /bin/sh -c #(nop) ADD file:e1dd18493a216ecd0c 125.2 MB
- 总结
打印指定Image中每一层Image命令行的历史记录。
