mirror of
https://github.com/moby/moby.git
synced 2026-07-12 10:35:14 +00:00
This is a follow-up to 1abc8f6158, which
moved the ContainerJSONBase to api/types/container, but also renamed it
to container.InspectBase. This field is embedded into the InspectResponse
type, which meant that renaming the type also implicitly renamed the
field when creating this type from a struct-literal.
While we're planning to merge these types (which would be a breaking
change for users constructing it through struct-literals), let's keep
it backward-compatible for now (other than deprecating the old names).
We can continue the other changes separately.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
28 lines
891 B
Go
28 lines
891 B
Go
package daemon // import "github.com/docker/docker/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(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,
|
|
}
|
|
}
|