Class CreateContainerCommand
java.lang.Object
org.jenkinsci.plugins.dockerbuildstep.cmd.DockerCommand
org.jenkinsci.plugins.dockerbuildstep.cmd.CreateContainerCommand
- All Implemented Interfaces:
ExtensionPoint
,Describable<DockerCommand>
This command creates new container from specified image.
- Author:
- vjuranek
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Nested classes/interfaces inherited from class org.jenkinsci.plugins.dockerbuildstep.cmd.DockerCommand
DockerCommand.DockerCommandDescriptor
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
Fields inherited from class org.jenkinsci.plugins.dockerbuildstep.cmd.DockerCommand
CREDENTIALS_MATCHER
-
Constructor Summary
ConstructorDescriptionCreateContainerCommand
(String image, String command, String hostName, String containerName, String envVars, String links, String exposedPorts, String cpuShares, String memoryLimit, String dns, String extraHosts, String networkMode, boolean publishAllPorts, String portBindings, String bindMounts, boolean privileged, boolean alwaysRestart) -
Method Summary
Modifier and TypeMethodDescriptionvoid
execute
(Launcher launcher, AbstractBuild build, ConsoleLogger console) getDns()
getImage()
getLinks()
boolean
boolean
boolean
boolean
boolean
Methods inherited from class org.jenkinsci.plugins.dockerbuildstep.cmd.DockerCommand
all, attachContainerOutput, getAuthConfig, getClient, getClient, getConfig, getDescriptor, getDockerRegistryEndpoint, getInfoString, readResolve
-
Constructor Details
-
CreateContainerCommand
@DataBoundConstructor public CreateContainerCommand(String image, String command, String hostName, String containerName, String envVars, String links, String exposedPorts, String cpuShares, String memoryLimit, String dns, String extraHosts, String networkMode, boolean publishAllPorts, String portBindings, String bindMounts, boolean privileged, boolean alwaysRestart) throws IllegalArgumentException - Throws:
IllegalArgumentException
-
-
Method Details
-
getImage
-
getCommand
-
getHostName
-
getContainerName
-
getEnvVars
-
getLinks
-
getExposedPorts
-
getMemoryLimit
-
getDns
-
getExtraHosts
-
getNetworkMode
-
isPublishAllPorts
public boolean isPublishAllPorts() -
isPrivileged
public boolean isPrivileged() -
getPublishAllPorts
public boolean getPublishAllPorts() -
getPortBindings
-
getBindMounts
-
getPrivileged
public boolean getPrivileged() -
isAlwaysRestart
public boolean isAlwaysRestart() -
execute
public void execute(Launcher launcher, AbstractBuild build, ConsoleLogger console) throws com.github.dockerjava.api.exception.DockerException - Specified by:
execute
in classDockerCommand
- Throws:
com.github.dockerjava.api.exception.DockerException
-