@@ -390,31 +390,35 @@ func imageDataToImageInspect(ctx context.Context, l *libimage.Image, r *http.Req
390390 cc .Volumes = info .Config .Volumes
391391
392392 dockerImageInspect := dockerImage.InspectResponse {
393- Architecture : info .Architecture ,
394- Author : info .Author ,
395- Comment : info .Comment ,
396- Config : & config ,
397- ContainerConfig : cc ,
398- Created : l .Created ().Format (time .RFC3339Nano ),
399- DockerVersion : info .Version ,
400- GraphDriver : graphDriver ,
401- ID : "sha256:" + l .ID (),
402- Metadata : dockerImage.Metadata {},
403- Os : info .Os ,
404- OsVersion : info .Version ,
405- Parent : info .Parent ,
406- RepoDigests : info .RepoDigests ,
407- RepoTags : info .RepoTags ,
408- RootFS : rootfs ,
409- Size : info .Size ,
410- Variant : "" ,
393+ Architecture : info .Architecture ,
394+ Author : info .Author ,
395+ Comment : info .Comment ,
396+ Config : & config ,
397+ Created : l .Created ().Format (time .RFC3339Nano ),
398+ DockerVersion : info .Version ,
399+ GraphDriver : graphDriver ,
400+ ID : "sha256:" + l .ID (),
401+ Metadata : dockerImage.Metadata {},
402+ Os : info .Os ,
403+ OsVersion : info .Version ,
404+ Parent : info .Parent ,
405+ RepoDigests : info .RepoDigests ,
406+ RepoTags : info .RepoTags ,
407+ RootFS : rootfs ,
408+ Size : info .Size ,
409+ Variant : "" ,
411410 }
412411
413412 if _ , err := apiutil .SupportedVersion (r , "<1.44.0" ); err == nil {
414413 //nolint:staticcheck // Deprecated field
415414 dockerImageInspect .VirtualSize = info .VirtualSize
416415 }
417416
417+ if _ , err := apiutil .SupportedVersion (r , "<1.45.0" ); err == nil {
418+ //nolint:staticcheck // Deprecated field
419+ dockerImageInspect .ContainerConfig = cc
420+ }
421+
418422 return & handlers.ImageInspect {InspectResponse : dockerImageInspect }, nil
419423}
420424
0 commit comments