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