mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
daemon: consolidate platform-specific inspectExecProcessConfig
This function was introduced in1af76ef597and based on the previous code in the daemon, which had platform-specific handling for exec inspect in [setPlatformSpecificExecProcessConfig], which was added in5fa2e4d4f2to account for Windows not having "Privileged" and not setting the "User". Given that "User" would be empty and "Privileged" not set, we may as well combine both platforms, and just return the info we have. [setPlatformSpecificExecProcessConfig]:1af76ef597/daemon/exec_unix.go (L11-L21)Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -3,18 +3,9 @@ package daemon
|
||||
import (
|
||||
"github.com/moby/moby/api/types/container"
|
||||
containerpkg "github.com/moby/moby/v2/daemon/container"
|
||||
"github.com/moby/moby/v2/daemon/server/backend"
|
||||
)
|
||||
|
||||
// This sets platform-specific fields
|
||||
func setPlatformSpecificContainerFields(container *containerpkg.Container, contJSONBase *container.ContainerJSONBase) *container.ContainerJSONBase {
|
||||
return contJSONBase
|
||||
}
|
||||
|
||||
func inspectExecProcessConfig(e *containerpkg.ExecConfig) *backend.ExecProcessConfig {
|
||||
return &backend.ExecProcessConfig{
|
||||
Tty: e.Tty,
|
||||
Entrypoint: e.Entrypoint,
|
||||
Arguments: e.Args,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user