justone / dockviz

Visualizing Docker data
Apache License 2.0
1.21k stars 107 forks source link

Image IDs differ when using --tree vs --dot #24

Closed kevin-canadian closed 8 years ago

kevin-canadian commented 8 years ago

When running using --tree the ID is "missing" for images without a hash, and "sha1:hash" for images with a hash. When running using --dot all images contain the "synth:fake" value.

I think it would be best if both --tree and --dot produced the same output. Moreover, this output should match the output from docker images when possible. In other words, whenever a hash is available, it should be without a prefix and it should use the first 12 characters of the sha hash (unless the -n option is used). When a hash is not available, both should provide the same (either "missing", or better yet, the "synth:fake" value).

justone commented 8 years ago

Thanks for catching that, will do a release soon.

kevin-canadian commented 8 years ago

Great, thanks for the quick resolution!

kevin-canadian commented 8 years ago

Just tested this, and it's better. But the IDs provided via the --tree option still have a "sha256:" prefix. Do you think you could remove this? Again, ideally this ID should match the output from "docker images", which is the ID that we need to use with other docker commands (e.g. docker rmi ).

justone commented 8 years ago

Good point, just added a commit to do that. I tried to match up with docker images way of doing things.

Incidentally, you can pass in the image names with the sha256: prefix and docker images will do the right thing.

justone commented 8 years ago

This is a part of the latest release, v0.4.2.

Thanks.

kevin-canadian commented 8 years ago

I wasn't sure if the prefix was allowed in other docker commands, but it's definitely nicer if the outputs match. Thank you, again!