Merge pull request #6597 from rhatdan/image

Add some additional fields to imageinspect
This commit is contained in:
OpenShift Merge Robot
2020-06-15 13:08:28 -04:00
committed by GitHub

View File

@ -247,6 +247,7 @@ func ImageDataToImageInspect(ctx context.Context, l *libpodImage.Image) (*ImageI
if err != nil { if err != nil {
return nil, err return nil, err
} }
// TODO the rest of these still need wiring! // TODO the rest of these still need wiring!
config := dockerContainer.Config{ config := dockerContainer.Config{
// Hostname: "", // Hostname: "",
@ -261,17 +262,17 @@ func ImageDataToImageInspect(ctx context.Context, l *libpodImage.Image) (*ImageI
// StdinOnce: false, // StdinOnce: false,
Env: info.Config.Env, Env: info.Config.Env,
Cmd: info.Config.Cmd, Cmd: info.Config.Cmd,
// Healthcheck: nil, //Healthcheck: l.ImageData.HealthCheck,
// ArgsEscaped: false, // ArgsEscaped: false,
// Image: "", // Image: "",
// Volumes: nil, Volumes: info.Config.Volumes,
// WorkingDir: "", WorkingDir: info.Config.WorkingDir,
// Entrypoint: nil, Entrypoint: info.Config.Entrypoint,
// NetworkDisabled: false, // NetworkDisabled: false,
// MacAddress: "", // MacAddress: "",
// OnBuild: nil, //OnBuild: info.Config.OnBuild,
Labels: info.Labels, Labels: info.Labels,
// StopSignal: "", StopSignal: info.Config.StopSignal,
// StopTimeout: nil, // StopTimeout: nil,
// Shell: nil, // Shell: nil,
} }
@ -285,7 +286,7 @@ func ImageDataToImageInspect(ctx context.Context, l *libpodImage.Image) (*ImageI
Comment: info.Comment, Comment: info.Comment,
Config: &config, Config: &config,
Created: l.Created().Format(time.RFC3339Nano), Created: l.Created().Format(time.RFC3339Nano),
DockerVersion: "", DockerVersion: info.Version,
GraphDriver: docker.GraphDriverData{}, GraphDriver: docker.GraphDriverData{},
ID: fmt.Sprintf("sha256:%s", l.ID()), ID: fmt.Sprintf("sha256:%s", l.ID()),
Metadata: docker.ImageMetadata{}, Metadata: docker.ImageMetadata{},