|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.github.dockerjava.core.command.AbstrDockerCmd<StartContainerCmd,Void>
com.github.dockerjava.core.command.StartContainerCmdImpl
public class StartContainerCmdImpl
Start a container
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.github.dockerjava.api.command.StartContainerCmd |
---|
StartContainerCmd.Exec |
Field Summary |
---|
Fields inherited from class com.github.dockerjava.core.command.AbstrDockerCmd |
---|
execution |
Constructor Summary | |
---|---|
StartContainerCmdImpl(StartContainerCmd.Exec exec,
String containerId)
|
Method Summary | |
---|---|
Void |
exec()
|
Bind[] |
getBinds()
|
Capability[] |
getCapAdd()
|
Capability[] |
getCapDrop()
|
String |
getContainerId()
|
Device[] |
getDevices()
|
String[] |
getDns()
|
String[] |
getDnsSearch()
|
Link[] |
getLinks()
|
LxcConf[] |
getLxcConf()
|
String |
getNetworkMode()
|
Ports |
getPortBindings()
|
RestartPolicy |
getRestartPolicy()
|
String |
getVolumesFrom()
|
boolean |
isPrivileged()
|
boolean |
isPublishAllPorts()
|
String |
toString()
|
StartContainerCmd |
withBinds(Bind... binds)
|
StartContainerCmd |
withCapAdd(Capability... capAdd)
Add linux kernel capability to the container. |
StartContainerCmd |
withCapDrop(Capability... capDrop)
Drop linux kernel capability from the container. |
StartContainerCmd |
withContainerId(String containerId)
|
StartContainerCmd |
withDevices(Device... devices)
Add host devices to the container |
StartContainerCmd |
withDns(String... dns)
Set custom DNS servers |
StartContainerCmd |
withDnsSearch(String... dnsSearch)
Set custom DNS search domains |
StartContainerCmd |
withLinks(Link... links)
Add link to another container. |
StartContainerCmd |
withLxcConf(LxcConf... lxcConf)
|
StartContainerCmd |
withNetworkMode(String networkMode)
Set the Network mode for the container 'bridge': creates a new network stack for the container on the docker bridge 'none': no networking for this container 'container: |
StartContainerCmd |
withPortBindings(PortBinding... portBindings)
Add one or more PortBinding s. |
StartContainerCmd |
withPortBindings(Ports portBindings)
Add the port bindings that are contained in the given Ports
object. |
StartContainerCmd |
withPrivileged(boolean privileged)
|
StartContainerCmd |
withPublishAllPorts(boolean publishAllPorts)
|
StartContainerCmd |
withRestartPolicy(RestartPolicy restartPolicy)
Set custom RestartPolicy for the container. |
StartContainerCmd |
withVolumesFrom(String volumesFrom)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public StartContainerCmdImpl(StartContainerCmd.Exec exec, String containerId)
Method Detail |
---|
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 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 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 String toString()
toString
in class Object
public Void exec() throws NotFoundException, NotModifiedException
exec
in interface DockerCmd<Void>
exec
in interface StartContainerCmd
exec
in class AbstrDockerCmd<StartContainerCmd,Void>
NotFoundException
- No such container
NotModifiedException
- Container already started
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |