Files
moby/daemon/exec_windows.go
Paweł Gronowski 638172417c 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>
2024-11-19 13:55:54 +01:00

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
}