Files
moby/daemon/inspect_linux.go
Sebastiaan van Stijn 7ea634f7e0 daemon: Daemon.getInspectData: inline struct-literals
Also rename the "container" argument, which shadowed an import.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 44972d7427)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-27 10:50:58 +02:00

28 lines
769 B
Go

package daemon
import (
"github.com/docker/docker/api/types/backend"
"github.com/docker/docker/api/types/container"
containerpkg "github.com/docker/docker/container"
)
// This sets platform-specific fields
func setPlatformSpecificContainerFields(ctr *containerpkg.Container, resp *container.ContainerJSONBase) *container.ContainerJSONBase {
resp.AppArmorProfile = ctr.AppArmorProfile
resp.ResolvConfPath = ctr.ResolvConfPath
resp.HostnamePath = ctr.HostnamePath
resp.HostsPath = ctr.HostsPath
return resp
}
func inspectExecProcessConfig(e *containerpkg.ExecConfig) *backend.ExecProcessConfig {
return &backend.ExecProcessConfig{
Tty: e.Tty,
Entrypoint: e.Entrypoint,
Arguments: e.Args,
Privileged: &e.Privileged,
User: e.User,
}
}