public class CreateContainerCmdImpl extends AbstrDockerCmd<CreateContainerCmd,CreateContainerResponse> implements CreateContainerCmd
Modifier and Type | Class and Description |
---|---|
static class |
CreateContainerCmdImpl.NetworkingConfig |
CreateContainerCmd.Exec
execution
Constructor and Description |
---|
CreateContainerCmdImpl(CreateContainerCmd.Exec exec,
String image) |
close, registryAuth
public CreateContainerCmdImpl(CreateContainerCmd.Exec exec, String image)
public CreateContainerResponse exec() throws NotFoundException, ConflictException
exec
in interface CreateContainerCmd
exec
in interface SyncDockerCmd<CreateContainerResponse>
exec
in class AbstrDockerCmd<CreateContainerCmd,CreateContainerResponse>
NotFoundException
- No such containerConflictException
- Named container already existspublic List<String> getAliases()
getAliases
in interface CreateContainerCmd
public Bind[] getBinds()
getBinds
in interface CreateContainerCmd
public Integer getBlkioWeight()
getBlkioWeight
in interface CreateContainerCmd
public Capability[] getCapAdd()
getCapAdd
in interface CreateContainerCmd
public Capability[] getCapDrop()
getCapDrop
in interface CreateContainerCmd
public String[] getCmd()
getCmd
in interface CreateContainerCmd
public Integer getCpuPeriod()
getCpuPeriod
in interface CreateContainerCmd
public String getCpusetCpus()
getCpusetCpus
in interface CreateContainerCmd
public String getCpusetMems()
getCpusetMems
in interface CreateContainerCmd
public Integer getCpuShares()
getCpuShares
in interface CreateContainerCmd
public Device[] getDevices()
getDevices
in interface CreateContainerCmd
public String[] getDns()
getDns
in interface CreateContainerCmd
public String[] getDnsSearch()
getDnsSearch
in interface CreateContainerCmd
public String getDomainName()
getDomainName
in interface CreateContainerCmd
public String[] getEntrypoint()
getEntrypoint
in interface CreateContainerCmd
public String[] getEnv()
getEnv
in interface CreateContainerCmd
public ExposedPort[] getExposedPorts()
getExposedPorts
in interface CreateContainerCmd
public String getStopSignal()
getStopSignal
in interface CreateContainerCmd
stopSignal
public String[] getExtraHosts()
getExtraHosts
in interface CreateContainerCmd
public String getHostName()
getHostName
in interface CreateContainerCmd
public String getImage()
getImage
in interface CreateContainerCmd
public String getIpv4Address()
getIpv4Address
in interface CreateContainerCmd
public String getIpv6Address()
getIpv6Address
in interface CreateContainerCmd
public Map<String,String> getLabels()
getLabels
in interface CreateContainerCmd
public Link[] getLinks()
getLinks
in interface CreateContainerCmd
public LxcConf[] getLxcConf()
getLxcConf
in interface CreateContainerCmd
public LogConfig getLogConfig()
getLogConfig
in interface CreateContainerCmd
public String getMacAddress()
getMacAddress
in interface CreateContainerCmd
public Long getMemory()
getMemory
in interface CreateContainerCmd
public Long getMemorySwap()
getMemorySwap
in interface CreateContainerCmd
public String getName()
getName
in interface CreateContainerCmd
public String getNetworkMode()
getNetworkMode
in interface CreateContainerCmd
public Ports getPortBindings()
getPortBindings
in interface CreateContainerCmd
public String[] getPortSpecs()
getPortSpecs
in interface CreateContainerCmd
public RestartPolicy getRestartPolicy()
getRestartPolicy
in interface CreateContainerCmd
public Ulimit[] getUlimits()
getUlimits
in interface CreateContainerCmd
public String getUser()
getUser
in interface CreateContainerCmd
public Volume[] getVolumes()
getVolumes
in interface CreateContainerCmd
public VolumesFrom[] getVolumesFrom()
getVolumesFrom
in interface CreateContainerCmd
public String getWorkingDir()
getWorkingDir
in interface CreateContainerCmd
public Boolean isAttachStderr()
isAttachStderr
in interface CreateContainerCmd
public Boolean isAttachStdin()
isAttachStdin
in interface CreateContainerCmd
public Boolean isAttachStdout()
isAttachStdout
in interface CreateContainerCmd
public Boolean isNetworkDisabled()
isNetworkDisabled
in interface CreateContainerCmd
public Boolean getOomKillDisable()
getOomKillDisable
in interface CreateContainerCmd
public Boolean getPrivileged()
getPrivileged
in interface CreateContainerCmd
public Boolean getPublishAllPorts()
getPublishAllPorts
in interface CreateContainerCmd
public Boolean getReadonlyRootfs()
getReadonlyRootfs
in interface CreateContainerCmd
public Boolean isStdInOnce()
isStdInOnce
in interface CreateContainerCmd
public Boolean isStdinOpen()
isStdinOpen
in interface CreateContainerCmd
public Boolean isTty()
isTty
in interface CreateContainerCmd
public String getPidMode()
getPidMode
in interface CreateContainerCmd
public String getCgroupParent()
getCgroupParent
in interface CreateContainerCmd
public CreateContainerCmd withAliases(String... aliases)
CreateContainerCmd
withAliases
in interface CreateContainerCmd
aliases
- on ore more aliasespublic CreateContainerCmd withAliases(List<String> aliases)
CreateContainerCmd
withAliases
in interface CreateContainerCmd
aliases
- on ore more aliasespublic CreateContainerCmd withAttachStderr(Boolean attachStderr)
withAttachStderr
in interface CreateContainerCmd
public CreateContainerCmd withAttachStdin(Boolean attachStdin)
withAttachStdin
in interface CreateContainerCmd
public CreateContainerCmd withAttachStdout(Boolean attachStdout)
withAttachStdout
in interface CreateContainerCmd
public CreateContainerCmd withBinds(Bind... binds)
withBinds
in interface CreateContainerCmd
public CreateContainerCmd withBinds(List<Bind> binds)
withBinds
in interface CreateContainerCmd
public CreateContainerCmd withBlkioWeight(Integer blkioWeight)
withBlkioWeight
in interface CreateContainerCmd
public CreateContainerCmd withCapAdd(Capability... capAdd)
CreateContainerCmd
Capability.MKNOD
allows the container to create special files using the 'mknod' command.withCapAdd
in interface CreateContainerCmd
public CreateContainerCmd withCapAdd(List<Capability> capAdd)
CreateContainerCmd
Capability.MKNOD
allows the container to create special files using the 'mknod' command.withCapAdd
in interface CreateContainerCmd
public CreateContainerCmd withCapDrop(Capability... capDrop)
CreateContainerCmd
Capability.CHOWN
prevents the container from changing the owner of any files.withCapDrop
in interface CreateContainerCmd
public CreateContainerCmd withCapDrop(List<Capability> capDrop)
CreateContainerCmd
Capability.CHOWN
prevents the container from changing the owner of any files.withCapDrop
in interface CreateContainerCmd
public CreateContainerCmd withCmd(String... cmd)
withCmd
in interface CreateContainerCmd
public CreateContainerCmd withCmd(List<String> cmd)
withCmd
in interface CreateContainerCmd
public CreateContainerCmd withContainerIDFile(String containerIDFile)
withContainerIDFile
in interface CreateContainerCmd
public CreateContainerCmd withCpuPeriod(Integer cpuPeriod)
withCpuPeriod
in interface CreateContainerCmd
public CreateContainerCmd withCpusetCpus(String cpusetCpus)
withCpusetCpus
in interface CreateContainerCmd
public CreateContainerCmd withCpusetMems(String cpusetMems)
withCpusetMems
in interface CreateContainerCmd
public CreateContainerCmd withCpuShares(Integer cpuShares)
withCpuShares
in interface CreateContainerCmd
public CreateContainerCmd withDevices(Device... devices)
CreateContainerCmd
withDevices
in interface CreateContainerCmd
public CreateContainerCmd withDevices(List<Device> devices)
CreateContainerCmd
withDevices
in interface CreateContainerCmd
public CreateContainerCmd withDns(String... dns)
CreateContainerCmd
withDns
in interface CreateContainerCmd
public CreateContainerCmd withDns(List<String> dns)
CreateContainerCmd
withDns
in interface CreateContainerCmd
public CreateContainerCmd withDnsSearch(String... dnsSearch)
CreateContainerCmd
withDnsSearch
in interface CreateContainerCmd
public CreateContainerCmd withDnsSearch(List<String> dnsSearch)
CreateContainerCmd
withDnsSearch
in interface CreateContainerCmd
public CreateContainerCmd withDomainName(String domainName)
withDomainName
in interface CreateContainerCmd
public CreateContainerCmd withEntrypoint(String... entrypoint)
withEntrypoint
in interface CreateContainerCmd
public CreateContainerCmd withEntrypoint(List<String> entrypoint)
withEntrypoint
in interface CreateContainerCmd
public CreateContainerCmd withEnv(String... env)
withEnv
in interface CreateContainerCmd
public CreateContainerCmd withEnv(List<String> env)
withEnv
in interface CreateContainerCmd
public CreateContainerCmd withExposedPorts(ExposedPort... exposedPorts)
withExposedPorts
in interface CreateContainerCmd
public CreateContainerCmd withStopSignal(String stopSignal)
withStopSignal
in interface CreateContainerCmd
public CreateContainerCmd withExposedPorts(List<ExposedPort> exposedPorts)
withExposedPorts
in interface CreateContainerCmd
public CreateContainerCmd withExtraHosts(String... extraHosts)
CreateContainerCmd
withExtraHosts
in interface CreateContainerCmd
public CreateContainerCmd withExtraHosts(List<String> extraHosts)
CreateContainerCmd
withExtraHosts
in interface CreateContainerCmd
public CreateContainerCmd withHostName(String hostName)
withHostName
in interface CreateContainerCmd
public CreateContainerCmd withImage(String image)
withImage
in interface CreateContainerCmd
public CreateContainerCmd withIpv4Address(String ipv4Address)
withIpv4Address
in interface CreateContainerCmd
public CreateContainerCmd withIpv6Address(String ipv6Address)
withIpv6Address
in interface CreateContainerCmd
public CreateContainerCmd withLabels(Map<String,String> labels)
withLabels
in interface CreateContainerCmd
public CreateContainerCmd withLinks(Link... links)
CreateContainerCmd
withLinks
in interface CreateContainerCmd
public CreateContainerCmd withLinks(List<Link> links)
CreateContainerCmd
withLinks
in interface CreateContainerCmd
public CreateContainerCmd withLxcConf(LxcConf... lxcConf)
withLxcConf
in interface CreateContainerCmd
public CreateContainerCmd withLxcConf(List<LxcConf> lxcConf)
withLxcConf
in interface CreateContainerCmd
public CreateContainerCmd withLogConfig(LogConfig logConfig)
withLogConfig
in interface CreateContainerCmd
public CreateContainerCmd withMacAddress(String macAddress)
withMacAddress
in interface CreateContainerCmd
public CreateContainerCmd withMemory(Long memory)
withMemory
in interface CreateContainerCmd
public CreateContainerCmd withMemorySwap(Long memorySwap)
withMemorySwap
in interface CreateContainerCmd
public CreateContainerCmd withName(String name)
withName
in interface CreateContainerCmd
public CreateContainerCmd withNetworkDisabled(Boolean disableNetwork)
withNetworkDisabled
in interface CreateContainerCmd
public CreateContainerCmd withNetworkMode(String networkMode)
CreateContainerCmd
withNetworkMode
in interface CreateContainerCmd
public CreateContainerCmd withOomKillDisable(Boolean oomKillDisable)
withOomKillDisable
in interface CreateContainerCmd
public CreateContainerCmd withPortBindings(PortBinding... portBindings)
CreateContainerCmd
PortBinding
s. This corresponds to the --publish
(-p
) option of the
docker run
CLI command.withPortBindings
in interface CreateContainerCmd
public CreateContainerCmd withPortBindings(List<PortBinding> portBindings)
CreateContainerCmd
PortBinding
s. This corresponds to the --publish
(-p
) option of the
docker run
CLI command.withPortBindings
in interface CreateContainerCmd
public CreateContainerCmd withPortBindings(Ports portBindings)
CreateContainerCmd
Ports
object.withPortBindings
in interface CreateContainerCmd
CreateContainerCmd.withPortBindings(PortBinding...)
public CreateContainerCmd withPortSpecs(String... portSpecs)
withPortSpecs
in interface CreateContainerCmd
public CreateContainerCmd withPortSpecs(List<String> portSpecs)
withPortSpecs
in interface CreateContainerCmd
public CreateContainerCmd withPrivileged(Boolean privileged)
withPrivileged
in interface CreateContainerCmd
public CreateContainerCmd withPublishAllPorts(Boolean publishAllPorts)
withPublishAllPorts
in interface CreateContainerCmd
public CreateContainerCmd withReadonlyRootfs(Boolean readonlyRootfs)
withReadonlyRootfs
in interface CreateContainerCmd
public CreateContainerCmd withRestartPolicy(RestartPolicy restartPolicy)
CreateContainerCmd
RestartPolicy
for the container. Defaults to RestartPolicy.noRestart()
withRestartPolicy
in interface CreateContainerCmd
public CreateContainerCmd withStdInOnce(Boolean stdInOnce)
withStdInOnce
in interface CreateContainerCmd
public CreateContainerCmd withStdinOpen(Boolean stdinOpen)
withStdinOpen
in interface CreateContainerCmd
public CreateContainerCmd withTty(Boolean tty)
withTty
in interface CreateContainerCmd
public CreateContainerCmd withUlimits(Ulimit... ulimits)
withUlimits
in interface CreateContainerCmd
public CreateContainerCmd withUlimits(List<Ulimit> ulimits)
withUlimits
in interface CreateContainerCmd
public CreateContainerCmd withUser(String user)
withUser
in interface CreateContainerCmd
public CreateContainerCmd withVolumes(Volume... volumes)
withVolumes
in interface CreateContainerCmd
public CreateContainerCmd withVolumes(List<Volume> volumes)
withVolumes
in interface CreateContainerCmd
public CreateContainerCmd withVolumesFrom(VolumesFrom... volumesFrom)
withVolumesFrom
in interface CreateContainerCmd
public CreateContainerCmd withVolumesFrom(List<VolumesFrom> volumesFrom)
withVolumesFrom
in interface CreateContainerCmd
public CreateContainerCmd withWorkingDir(String workingDir)
withWorkingDir
in interface CreateContainerCmd
public CreateContainerCmd withCgroupParent(String cgroupParent)
withCgroupParent
in interface CreateContainerCmd
public CreateContainerCmd withPidMode(String pidMode)
CreateContainerCmd
withPidMode
in interface CreateContainerCmd
public String toString()
toString
in class AbstrDockerCmd<CreateContainerCmd,CreateContainerResponse>
Copyright © 2016. All Rights Reserved.