container_solaris.go 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. // +build solaris
  2. package container
  3. import (
  4. "os"
  5. "path/filepath"
  6. "github.com/docker/docker/volume"
  7. "github.com/docker/engine-api/types/container"
  8. )
  9. // Container holds fields specific to the Solaris implementation. See
  10. // CommonContainer for standard fields common to all containers.
  11. type Container struct {
  12. CommonContainer
  13. // fields below here are platform specific.
  14. HostnamePath string
  15. HostsPath string
  16. ResolvConfPath string
  17. }
  18. // ExitStatus provides exit reasons for a container.
  19. type ExitStatus struct {
  20. // The exit code with which the container exited.
  21. ExitCode int
  22. }
  23. // CreateDaemonEnvironment creates a new environment variable slice for this container.
  24. func (container *Container) CreateDaemonEnvironment(linkedEnv []string) []string {
  25. return nil
  26. }
  27. func appendNetworkMounts(container *Container, volumeMounts []volume.MountPoint) ([]volume.MountPoint, error) {
  28. return volumeMounts, nil
  29. }
  30. // TrySetNetworkMount attempts to set the network mounts given a provided destination and
  31. // the path to use for it; return true if the given destination was a network mount file
  32. func (container *Container) TrySetNetworkMount(destination string, path string) bool {
  33. return true
  34. }
  35. // NetworkMounts returns the list of network mounts.
  36. func (container *Container) NetworkMounts() []Mount {
  37. var mount []Mount
  38. return mount
  39. }
  40. // CopyImagePathContent copies files in destination to the volume.
  41. func (container *Container) CopyImagePathContent(v volume.Volume, destination string) error {
  42. return nil
  43. }
  44. // UnmountIpcMounts unmount Ipc related mounts.
  45. func (container *Container) UnmountIpcMounts(unmount func(pth string) error) {
  46. }
  47. // IpcMounts returns the list of Ipc related mounts.
  48. func (container *Container) IpcMounts() []Mount {
  49. return nil
  50. }
  51. // UpdateContainer updates configuration of a container
  52. func (container *Container) UpdateContainer(hostConfig *container.HostConfig) error {
  53. return nil
  54. }
  55. // UnmountVolumes explicitly unmounts volumes from the container.
  56. func (container *Container) UnmountVolumes(forceSyscall bool, volumeEventLog func(name, action string, attributes map[string]string)) error {
  57. return nil
  58. }
  59. // TmpfsMounts returns the list of tmpfs mounts
  60. func (container *Container) TmpfsMounts() []Mount {
  61. var mounts []Mount
  62. return mounts
  63. }
  64. // cleanResourcePath cleans a resource path and prepares to combine with mnt path
  65. func cleanResourcePath(path string) string {
  66. return filepath.Join(string(os.PathSeparator), path)
  67. }
  68. // BuildHostnameFile writes the container's hostname file.
  69. func (container *Container) BuildHostnameFile() error {
  70. return nil
  71. }
  72. // canMountFS determines if the file system for the container
  73. // can be mounted locally. A no-op on non-Windows platforms
  74. func (container *Container) canMountFS() bool {
  75. return true
  76. }