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