mirror of
https://github.com/moby/moby.git
synced 2026-07-11 18:13:57 +00:00
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>
17 lines
449 B
Go
17 lines
449 B
Go
package daemon // import "github.com/docker/docker/daemon"
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/docker/docker/container"
|
|
"github.com/docker/docker/daemon/config"
|
|
"github.com/opencontainers/runtime-spec/specs-go"
|
|
)
|
|
|
|
func (daemon *Daemon) execSetPlatformOpt(ctx context.Context, daemonCfg *config.Config, ec *container.ExecConfig, p *specs.Process) error {
|
|
if ec.Container.ImagePlatform.OS == "windows" {
|
|
p.User.Username = ec.User
|
|
}
|
|
return nil
|
|
}
|