Commit Graph

3 Commits

Author SHA1 Message Date
Vincent Demeester a6800f95fa
Import `docker/docker/pkg/templates` to cli
This package will be deprecated/removed from `docker/docker/pkg` and
is mainly used for the cli format options. Let's import it and
maintain here.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-08-08 17:26:24 +02:00
Boaz Shuster 9a2f2d769d Unmarshal a number as a Number in RawInspectFallback
Running `docker inspect --format "{{.ID}} {{.Size}}" alpine` prints
sha256:651aa95985aa4a17a38ffcf71f598ec461924ca96865facc2c5782ef2d2be07f 3983636
While `docker inspect --format "{{.Id}} {{.Size}}" alpine` prints
sha256:651aa95985aa4a17a38ffcf71f598ec461924ca96865facc2c5782ef2d2be07f 3.983636e+06

This happens because "Id" is not a field of types.ImageInspect and thus
tryRawInspectFallback is called and converts the raw response into `interface{}`
using a JSON decoder. However, by default that decoder converts numbers into
`float64` unless `UseNumber` is set.

Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
2017-06-21 13:10:14 +03:00
Daniel Nephin 1630fc40f8 Import docker/docker/cli
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2017-04-17 17:40:59 -04:00