Skip to content

Use spf13/cobra for docker history#23291

Merged
vdemeester merged 1 commit intomoby:masterfrom
yongtang:23211-spf13-cobra-history
Jun 7, 2016
Merged

Use spf13/cobra for docker history#23291
vdemeester merged 1 commit intomoby:masterfrom
yongtang:23211-spf13-cobra-history

Conversation

@yongtang
Copy link
Copy Markdown
Member

@yongtang yongtang commented Jun 6, 2016

This fix is part of the effort to convert commands to spf13/cobra #23211.

Thif fix coverted command docker history to use spf13/cobra

Signed-off-by: Yong Tang [email protected]

@vdemeester
Copy link
Copy Markdown
Member

LGTM 🐮

@yongtang yongtang force-pushed the 23211-spf13-cobra-history branch from 6142da6 to 401f8fb Compare June 6, 2016 12:27
This fix is part of the effort to convert commands to spf13/cobra moby#23211.

Thif fix coverted command `docker history` to use spf13/cobra

Signed-off-by: Yong Tang <[email protected]>
@yongtang yongtang force-pushed the 23211-spf13-cobra-history branch from 401f8fb to a76d387 Compare June 6, 2016 15:03
@cpuguy83
Copy link
Copy Markdown
Member

cpuguy83 commented Jun 6, 2016

LGTM

@thaJeztah
Copy link
Copy Markdown
Member

Ok, learned two things from testing this;

  1. Looks like docker history does not support immutable identifiers (also true for docker 1.11);

    docker history nginx@sha256:e2d7332b6da6dba653c81c1596a0aa1142e5a28fc99a153ec06520285d420924
    Error response from daemon: no such id: nginx@sha256:e2d7332b6da6dba653c81c1596a0aa1142e5a28fc99a153ec06520285d420924

  2. The output format of the "non human" version of the date is dependent on the host (settings), it seems:

on my host

docker history --human=false nginx:alpine
IMAGE               CREATED                     CREATED BY                                      SIZE                COMMENT
a32fd277704c        2016-06-01T20:06:21+02:00   /bin/sh -c #(nop) CMD ["nginx" "-g" "daemon o   0
<missing>           2016-06-01T20:06:20+02:00   /bin/sh -c #(nop) EXPOSE 443/tcp 80/tcp         0
...

in container

docker history --human=false nginx:alpine
IMAGE               CREATED                CREATED BY                                      SIZE                COMMENT
a32fd277704c        2016-06-01T18:06:21Z   /bin/sh -c #(nop) CMD ["nginx" "-g" "daemon o   0
<missing>           2016-06-01T18:06:20Z   /bin/sh -c #(nop) EXPOSE 443/tcp 80/tcp         0
...

@thaJeztah
Copy link
Copy Markdown
Member

but, LGTM, thanks @yongtang!

@vdemeester vdemeester merged commit 804536d into moby:master Jun 7, 2016
@yongtang yongtang deleted the 23211-spf13-cobra-history branch June 7, 2016 12:27
dnephin pushed a commit to dnephin/docker that referenced this pull request Apr 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants