|
@@ -2,7 +2,10 @@
|
|
|
|
|
|
package daemon
|
|
|
|
|
|
-import "github.com/docker/docker/api/types"
|
|
|
+import (
|
|
|
+ "github.com/docker/docker/api/types"
|
|
|
+ "github.com/docker/docker/api/types/versions/v1p19"
|
|
|
+)
|
|
|
|
|
|
// This sets platform-specific fields
|
|
|
func setPlatformSpecificContainerFields(container *Container, contJSONBase *types.ContainerJSONBase) *types.ContainerJSONBase {
|
|
@@ -15,7 +18,7 @@ func setPlatformSpecificContainerFields(container *Container, contJSONBase *type
|
|
|
}
|
|
|
|
|
|
// ContainerInspectPre120 gets containers for pre 1.20 APIs.
|
|
|
-func (daemon *Daemon) ContainerInspectPre120(name string) (*types.ContainerJSONPre120, error) {
|
|
|
+func (daemon *Daemon) ContainerInspectPre120(name string) (*v1p19.ContainerJSON, error) {
|
|
|
container, err := daemon.Get(name)
|
|
|
if err != nil {
|
|
|
return nil, err
|
|
@@ -36,7 +39,7 @@ func (daemon *Daemon) ContainerInspectPre120(name string) (*types.ContainerJSONP
|
|
|
volumesRW[m.Destination] = m.RW
|
|
|
}
|
|
|
|
|
|
- config := &types.ContainerConfigPre120{
|
|
|
+ config := &v1p19.ContainerConfig{
|
|
|
container.Config,
|
|
|
container.hostConfig.VolumeDriver,
|
|
|
container.hostConfig.Memory,
|
|
@@ -45,7 +48,7 @@ func (daemon *Daemon) ContainerInspectPre120(name string) (*types.ContainerJSONP
|
|
|
container.hostConfig.CpusetCpus,
|
|
|
}
|
|
|
|
|
|
- return &types.ContainerJSONPre120{base, volumes, volumesRW, config}, nil
|
|
|
+ return &v1p19.ContainerJSON{base, volumes, volumesRW, config}, nil
|
|
|
}
|
|
|
|
|
|
func addMountPoints(container *Container) []types.MountPoint {
|