Reverse Engineering a Docker Image
docker history does a lot of this.<p><pre><code>    $ docker history tmknom&#x2F;prettier:2.0.5 --no-trunc
    IMAGE                                                                     CREATED             CREATED BY                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   SIZE                COMMENT
    sha256:88f38be28f05f38dba94ce0c1328ebe2b963b65848ab96594f8172a9c3b0f25b   10 months ago       &#x2F;bin&#x2F;sh -c #(nop)  CMD [&quot;--help&quot;]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            0B
    &lt;missing&gt;                                                                 10 months ago       &#x2F;bin&#x2F;sh -c #(nop)  ENTRYPOINT [&quot;&#x2F;usr&#x2F;bin&#x2F;prettier&quot;]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          0B
    &lt;missing&gt;                                                                 10 months ago       &#x2F;bin&#x2F;sh -c #(nop) WORKDIR &#x2F;work                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              0B
    &lt;missing&gt;                                                                 10 months ago       |6 BUILD_DATE=2020-04-29T06:34:01Z NODEJS_VERSION=12.15.0-r1 PRETTIER_VERSION=2.0.5 REPO_NAME=tmknom&#x2F;prettier VCS_REF=35d2587 VERSION=2.0.5 &#x2F;bin&#x2F;sh -c set -x &amp;&amp;     apk add --no-cache nodejs=${NODEJS_VERSION} nodejs-npm=${NODEJS_VERSION} &amp;&amp;     npm install -g prettier@${PRETTIER_VERSION} &amp;&amp;     npm cache clean --force &amp;&amp;     apk del nodejs-npm                                                                                                                                                                                                                                    42.5MB
    &lt;missing&gt;                                                                 10 months ago       &#x2F;bin&#x2F;sh -c #(nop)  ARG PRETTIER_VERSION                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      0B
    &lt;missing&gt;                                                                 10 months ago       &#x2F;bin&#x2F;sh -c #(nop)  ARG NODEJS_VERSION=12.15.0-r1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             0B
    &lt;missing&gt;                                                                 10 months ago       &#x2F;bin&#x2F;sh -c #(nop)  LABEL org.label-schema.vendor=tmknom org.label-schema.name=tmknom&#x2F;prettier org.label-schema.description=Prettier is an opinionated code formatter. org.label-schema.build-date=2020-04-29T06:34:01Z org.label-schema.version=2.0.5 org.label-schema.vcs-ref=35d2587 org.label-schema.vcs-url=https:&#x2F;&#x2F;github.com&#x2F;tmknom&#x2F;prettier org.label-schema.usage=https:&#x2F;&#x2F;github.com&#x2F;tmknom&#x2F;prettier&#x2F;blob&#x2F;master&#x2F;README.md#usage org.label-schema.docker.cmd=docker run --rm -v $PWD:&#x2F;work tmknom&#x2F;prettier --parser=markdown --write &#x27;**&#x2F;*.md&#x27; org.label-schema.schema-version=1.0   0B
    &lt;missing&gt;                                                                 10 months ago       &#x2F;bin&#x2F;sh -c #(nop)  ARG REPO_NAME                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             0B
    &lt;missing&gt;                                                                 10 months ago       &#x2F;bin&#x2F;sh -c #(nop)  ARG VERSION                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               0B
    &lt;missing&gt;                                                                 10 months ago       &#x2F;bin&#x2F;sh -c #(nop)  ARG VCS_REF                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               0B
    &lt;missing&gt;                                                                 10 months ago       &#x2F;bin&#x2F;sh -c #(nop)  ARG BUILD_DATE                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            0B
    &lt;missing&gt;                                                                 10 months ago       &#x2F;bin&#x2F;sh -c #(nop)  CMD [&quot;&#x2F;bin&#x2F;sh&quot;]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           0B
    &lt;missing&gt;                                                                 10 months ago       &#x2F;bin&#x2F;sh -c #(nop) ADD file:b91adb67b670d3a6ff9463e48b7def903ed516be66fc4282d22c53e41512be49 in &#x2F;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             5.61MB</code></pre>