docker history

表題のコマンド。

■ 環境

  • Docker for Mac 1.13.0
  • Mac OSX El Capitan

■ history

なんだろう?と思って実行してみた。

$ docker history -h
Flag shorthand -h has been deprecated, please use --help

Usage:     docker history [OPTIONS] IMAGE

Show the history of an image

Options:
      --help       Print usage
  -H, --human      Print sizes and dates in human readable format (default true)
      --no-trunc   Don't truncate output
  -q, --quiet      Only show numeric IDs
$

elasticsearch“のコンテナで試してみる。

$ docker history elasticsearch
IMAGE          CREATED       CREATED BY                                      SIZE     COMMENT
bca6fa4a7062   2 days ago    /bin/sh -c #(nop)  CMD ["elasticsearch"]        0 B
<missing>      2 days ago    /bin/sh -c #(nop)  ENTRYPOINT ["/docker-en...   0 B
<missing>      2 days ago    /bin/sh -c #(nop)  EXPOSE 9200/tcp 9300/tcp     0 B
<missing>      2 days ago    /bin/sh -c #(nop) COPY file:251082110c6dbd...   741 B
<missing>      2 days ago    /bin/sh -c #(nop)  VOLUME [/usr/share/elas...   0 B
<missing>      2 days ago    /bin/sh -c #(nop) COPY dir:c3faa196a3b1c87...   424 B
<missing>      2 days ago    /bin/sh -c set -ex  && for path in   ./dat...   0 B
<missing>      2 days ago    /bin/sh -c #(nop)  WORKDIR /usr/share/elas...   0 B
<missing>      2 days ago    /bin/sh -c #(nop)  ENV PATH=/usr/share/ela...   0 B
<missing>      2 days ago    /bin/sh -c set -x   && dpkg-divert --renam...   37.7 MB
<missing>      2 days ago    /bin/sh -c #(nop)  ENV ELASTICSEARCH_DEB_V...   0 B
<missing>      2 days ago    /bin/sh -c #(nop)  ENV ELASTICSEARCH_VERSI...   0 B
<missing>      2 weeks ago   /bin/sh -c set -x  && apt-get update && ap...   1.21 MB
<missing>      2 weeks ago   /bin/sh -c set -ex;  key='46095ACC8548582C...   1.22 kB
<missing>      2 weeks ago   /bin/sh -c set -x  && wget -O /usr/local/b...   2.7 MB
<missing>      2 weeks ago   /bin/sh -c #(nop)  ENV GOSU_VERSION=1.7         0 B
<missing>      2 weeks ago   /bin/sh -c /var/lib/dpkg/info/ca-certifica...   419 kB
<missing>      2 weeks ago   /bin/sh -c set -x  && apt-get update  && a...   142 MB
<missing>      2 weeks ago   /bin/sh -c #(nop)  ENV CA_CERTIFICATES_JAV...   0 B
<missing>      2 weeks ago   /bin/sh -c #(nop)  ENV JAVA_DEBIAN_VERSION...   0 B
<missing>      2 weeks ago   /bin/sh -c #(nop)  ENV JAVA_VERSION=8u111       0 B
<missing>      2 weeks ago   /bin/sh -c #(nop)  ENV JAVA_HOME=/usr/lib/...   0 B
<missing>      2 weeks ago   /bin/sh -c {   echo '#!/bin/sh';   echo 's...   87 B
<missing>      2 weeks ago   /bin/sh -c #(nop)  ENV LANG=C.UTF-8             0 B
<missing>      2 weeks ago   /bin/sh -c echo 'deb http://deb.debian.org...   55 B
<missing>      2 weeks ago   /bin/sh -c apt-get update && apt-get insta...   1.17 MB
<missing>      2 weeks ago   /bin/sh -c apt-get update && apt-get insta...   44.3 MB
<missing>      2 weeks ago   /bin/sh -c #(nop)  CMD ["/bin/bash"]            0 B
<missing>      2 weeks ago   /bin/sh -c #(nop) ADD file:89ecb642d662ee7...   123 MB
$

へーと思っただけである。

以上。