Merge pull request #802 from baude/add_image_id_to_ps

Add image_id to json output
This commit is contained in:
Daniel J Walsh 2017-08-29 06:57:45 -04:00 committed by GitHub
commit 62f275c784
2 changed files with 4 additions and 0 deletions

View file

@ -53,6 +53,7 @@ type psTemplateParams struct {
type psJSONParams struct {
ID string `json:"id"`
Image string `json:"image"`
ImageID string `json:"image_id"`
Command string `json:"command"`
CreatedAt time.Time `json:"createdAt"`
RunningFor time.Duration `json:"runningFor"`
@ -296,6 +297,7 @@ func getJSONOutput(containers []*libkpod.ContainerData) (psOutput []psJSONParams
params := psJSONParams{
ID: ctr.ID,
Image: ctr.FromImage,
ImageID: ctr.FromImageID,
Command: ctr.ImageCreatedBy,
CreatedAt: ctr.State.Created,
RunningFor: time.Since(ctr.State.Created),

View file

@ -51,6 +51,8 @@ kpod images --format json
kpod images --format "{{.ID}}"
kpod images --filter dangling=true
## SEE ALSO
kpod(1)