public class StartContainerCmdImpl extends AbstrDockerCmd<StartContainerCmd,Void> implements StartContainerCmd
StartContainerCmd.Exec
execution
Constructor and Description |
---|
StartContainerCmdImpl(StartContainerCmd.Exec exec,
String containerId) |
close
public StartContainerCmdImpl(StartContainerCmd.Exec exec, String containerId)
public Bind[] getBinds()
getBinds
in interface StartContainerCmd
public Link[] getLinks()
getLinks
in interface StartContainerCmd
public LxcConf[] getLxcConf()
getLxcConf
in interface StartContainerCmd
public Ports getPortBindings()
getPortBindings
in interface StartContainerCmd
public Boolean isPublishAllPorts()
isPublishAllPorts
in interface StartContainerCmd
public Boolean isPrivileged()
isPrivileged
in interface StartContainerCmd
public String[] getDns()
getDns
in interface StartContainerCmd
public String[] getDnsSearch()
getDnsSearch
in interface StartContainerCmd
public String getVolumesFrom()
getVolumesFrom
in interface StartContainerCmd
public String getContainerId()
getContainerId
in interface StartContainerCmd
public String getNetworkMode()
getNetworkMode
in interface StartContainerCmd
public Device[] getDevices()
getDevices
in interface StartContainerCmd
public String[] getExtraHosts()
getExtraHosts
in interface StartContainerCmd
public RestartPolicy getRestartPolicy()
getRestartPolicy
in interface StartContainerCmd
public Capability[] getCapAdd()
getCapAdd
in interface StartContainerCmd
public Capability[] getCapDrop()
getCapDrop
in interface StartContainerCmd
public StartContainerCmd withBinds(Bind... binds)
withBinds
in interface StartContainerCmd
public StartContainerCmd withLinks(Link... links)
StartContainerCmd
withLinks
in interface StartContainerCmd
public StartContainerCmd withLxcConf(LxcConf... lxcConf)
withLxcConf
in interface StartContainerCmd
public StartContainerCmd withPortBindings(Ports portBindings)
StartContainerCmd
Ports
object.withPortBindings
in interface StartContainerCmd
StartContainerCmd.withPortBindings(PortBinding...)
public StartContainerCmd withPortBindings(PortBinding... portBindings)
StartContainerCmd
PortBinding
s.
This corresponds to the --publish
(-p
)
option of the docker run
CLI command.withPortBindings
in interface StartContainerCmd
public StartContainerCmd withPrivileged(Boolean privileged)
withPrivileged
in interface StartContainerCmd
public StartContainerCmd withPublishAllPorts(Boolean publishAllPorts)
withPublishAllPorts
in interface StartContainerCmd
public StartContainerCmd withDns(String... dns)
StartContainerCmd
withDns
in interface StartContainerCmd
public StartContainerCmd withDnsSearch(String... dnsSearch)
StartContainerCmd
withDnsSearch
in interface StartContainerCmd
public StartContainerCmd withVolumesFrom(String volumesFrom)
withVolumesFrom
in interface StartContainerCmd
public StartContainerCmd withContainerId(String containerId)
withContainerId
in interface StartContainerCmd
public StartContainerCmd withNetworkMode(String networkMode)
StartContainerCmd
withNetworkMode
in interface StartContainerCmd
public StartContainerCmd withDevices(Device... devices)
StartContainerCmd
withDevices
in interface StartContainerCmd
public StartContainerCmd withExtraHosts(String... extraHosts)
StartContainerCmd
withExtraHosts
in interface StartContainerCmd
public StartContainerCmd withRestartPolicy(RestartPolicy restartPolicy)
StartContainerCmd
RestartPolicy
for the container. Defaults to
RestartPolicy.noRestart()
withRestartPolicy
in interface StartContainerCmd
public StartContainerCmd withCapAdd(Capability... capAdd)
StartContainerCmd
Capability.MKNOD
allows the container to create special files using the 'mknod' command.withCapAdd
in interface StartContainerCmd
public StartContainerCmd withCapDrop(Capability... capDrop)
StartContainerCmd
Capability.CHOWN
prevents the container from changing the owner of any files.withCapDrop
in interface StartContainerCmd
public Void exec() throws NotFoundException, NotModifiedException
exec
in interface DockerCmd<Void>
exec
in interface StartContainerCmd
exec
in class AbstrDockerCmd<StartContainerCmd,Void>
NotFoundException
- No such containerNotModifiedException
- Container already startedCopyright © 2015. All Rights Reserved.