f0dd554e3c
API v1.23 and older are deprecated, so we can remove the code to adjust responses for API v1.19 and lower. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
27 lines
854 B
Go
27 lines
854 B
Go
package daemon // import "github.com/docker/docker/daemon"
|
|
|
|
import (
|
|
"github.com/docker/docker/api/types"
|
|
"github.com/docker/docker/api/types/backend"
|
|
"github.com/docker/docker/container"
|
|
)
|
|
|
|
// This sets platform-specific fields
|
|
func setPlatformSpecificContainerFields(container *container.Container, contJSONBase *types.ContainerJSONBase) *types.ContainerJSONBase {
|
|
contJSONBase.AppArmorProfile = container.AppArmorProfile
|
|
contJSONBase.ResolvConfPath = container.ResolvConfPath
|
|
contJSONBase.HostnamePath = container.HostnamePath
|
|
contJSONBase.HostsPath = container.HostsPath
|
|
|
|
return contJSONBase
|
|
}
|
|
|
|
func inspectExecProcessConfig(e *container.ExecConfig) *backend.ExecProcessConfig {
|
|
return &backend.ExecProcessConfig{
|
|
Tty: e.Tty,
|
|
Entrypoint: e.Entrypoint,
|
|
Arguments: e.Args,
|
|
Privileged: &e.Privileged,
|
|
User: e.User,
|
|
}
|
|
}
|