Documentation ¶
Index ¶
Constants ¶
View Source
const PADDLEFL_CONTAINER_IMAGE = "registry.baidubce.com/paddledtx/paddledtx-paddlefl:1.1.2"
View Source
const PADDLEFL_CONTAINER_WORKSPACE = "/workspace/%s/"
View Source
const PADDLEFL_LOCAL_WORKSPACE = "/home/paddlefl/%s/"
Variables ¶
This section is empty.
Functions ¶
func CheckRunningStatusByContainerName ¶
CheckRunningStatusByContainerName use container's name to check whether the container is running
func CreateAndStartContainer ¶
func CreateAndStartContainer(containerInfo *ContainerInfo) error
CreateAndStartContainer create and start a container
func RunCommand ¶
Types ¶
type ContainerInfo ¶
type ContainerInfo struct { // image's name, contains repository name and tag Image string // container's name Name string // commands executed one the container created Cmd []string // container's workspace WorkingDir string // ports mapping between physical machine and docker container, every string is equal to '-p' in 'docker run' Port []string // volumes mapping between physical machine and docker container, every string is equal to '-v' in 'docker run' Volume []string }
ContainerInfo is the information required in creating a container, like the parameters of terminal command 'docker run'
Click to show internal directories.
Click to hide internal directories.