mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
container: Add ImagePlatform field and deprecate OS
Change the persistent container metadata to store the whole platform (as defined by OCI) instead of only the operating system. Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
@@ -151,7 +151,7 @@ func (daemon *Daemon) CreateImageFromContainer(ctx context.Context, name string,
|
||||
if c.Config == nil {
|
||||
c.Config = container.Config
|
||||
}
|
||||
newConfig, err := dockerfile.BuildFromConfig(ctx, c.Config, c.Changes, container.OS)
|
||||
newConfig, err := dockerfile.BuildFromConfig(ctx, c.Config, c.Changes, container.ImagePlatform.OS)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
@@ -166,7 +166,7 @@ func (daemon *Daemon) CreateImageFromContainer(ctx context.Context, name string,
|
||||
ContainerConfig: container.Config,
|
||||
ContainerID: container.ID,
|
||||
ContainerMountLabel: container.MountLabel,
|
||||
ContainerOS: container.OS,
|
||||
ContainerOS: container.ImagePlatform.OS,
|
||||
ParentImageID: string(container.ImageID),
|
||||
})
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user