Files
moby/daemon/inspect_linux.go
Derek McGowan afd6487b2e Create github.com/moby/moby/api module
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-07-21 09:30:05 -07:00

28 lines
846 B
Go

package daemon
import (
containerpkg "github.com/docker/docker/daemon/container"
"github.com/moby/moby/api/types/backend"
"github.com/moby/moby/api/types/container"
)
// This sets platform-specific fields
func setPlatformSpecificContainerFields(container *containerpkg.Container, contJSONBase *container.ContainerJSONBase) *container.ContainerJSONBase {
contJSONBase.AppArmorProfile = container.AppArmorProfile
contJSONBase.ResolvConfPath = container.ResolvConfPath
contJSONBase.HostnamePath = container.HostnamePath
contJSONBase.HostsPath = container.HostsPath
return contJSONBase
}
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,
}
}