Documentation ¶
Index ¶
- Variables
- func CreateMountPoint(rootURL string, mntURL string)
- func CreateReadOnlyLayer(rootURL string)
- func CreateWriteLayer(rootURL string)
- func DeleteMountPoint(rootURL string, mntURL string)
- func DeleteMountPointWithVolume(rootURL string, mntURL string, volumeURLs []string)
- func DeleteWorkSpace(rootURL string, mntURL string, volume string)
- func DeleteWriteLayer(rootURL string)
- func MountVolume(rootURL string, mntURL string, volumeURLs []string)
- func NewParentProcess(tty bool, volume string) (*exec.Cmd, *os.File)
- func NewPipe() (*os.File, *os.File, error)
- func NewWorkSpace(rootURL string, mntURL string, volume string)
- func PathExists(path string) (bool, error)
- func RunContainerInitProcess() error
- type ContainerInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var ( RUNNING string = "running" STOP string = "stopped" Exit string = "exited" DefaultInfoLocation string = "/var/run/mydocker/%s/" ConfigName string = "config.json" ContainerLogFile string = "container.log" RootUrl string = "/root" MntUrl string = "/root/mnt/%s" WriteLayerUrl string = "/root/writeLayer/%s" )
Functions ¶
func CreateMountPoint ¶
func CreateReadOnlyLayer ¶
func CreateReadOnlyLayer(rootURL string)
把busybox.tar解压到busybox目录下,作为容器只读层
func CreateWriteLayer ¶
func CreateWriteLayer(rootURL string)
func DeleteMountPoint ¶
func DeleteWorkSpace ¶
func DeleteWriteLayer ¶
func DeleteWriteLayer(rootURL string)
func MountVolume ¶
func NewWorkSpace ¶
Create a AUFS filesystem as container root workspace
func PathExists ¶
func RunContainerInitProcess ¶
func RunContainerInitProcess() error
Types ¶
type ContainerInfo ¶
type ContainerInfo struct { Pid string `json:"pid"` //容器的init进程在宿主机上的 PID Id string `json:"id"` //容器Id Name string `json:"name"` //容器名 Command string `json:"command"` //容器内init运行命令 CreatedTime string `json:"createTime"` //创建时间 Status string `json:"status"` //容器的状态 Volume string `json:"volume"` //容器的数据卷 PortMapping []string `json:"portmapping"` //端口映射 }
Click to show internal directories.
Click to hide internal directories.