mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
28 lines
854 B
Go
28 lines
854 B
Go
package daemon
|
|
|
|
import (
|
|
"github.com/docker/docker/api/types/backend"
|
|
"github.com/docker/docker/api/types/container"
|
|
containerpkg "github.com/docker/docker/daemon/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,
|
|
}
|
|
}
|