Documentation ¶
Index ¶
- type RunOption
- func (o *RunOption) BuildImage(cmd *cobra.Command) error
- func (o *RunOption) ConnectToDocker() (cli *client.Client, err error)
- func (o *RunOption) CreateDockerfile(cmd *cobra.Command, args []string) (err error)
- func (o *RunOption) CreateImageAndRunContainer(cmd *cobra.Command, args []string) (err error)
- func (o *RunOption) GetTarReader(cmd *cobra.Command) (*bytes.Reader, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RunOption ¶
type RunOption struct { ImageName string Tag string IP string DockerPort int DockerfilePath string //the Script is used to run several commands in entrypoint Script string JenkinsPort int WarPath string //the TmpDir stores Dockerfile and Script TmpDir string }
RunOption contains some of the options used to create a docker image and run a container
var DockerRunOption RunOption
DockerRunOption is an option for starting a container in docker
func (*RunOption) BuildImage ¶
BuildImage is used to build an image
func (*RunOption) ConnectToDocker ¶
ConnectToDocker returns a client which is used to connect to a local or remote docker host
func (*RunOption) CreateDockerfile ¶
CreateDockerfile will create a docker file for running a jenkins war contains plugins hpi
func (*RunOption) CreateImageAndRunContainer ¶
CreateImageAndRunContainer is to create an docker image and run a container from the image
Click to show internal directories.
Click to hide internal directories.