public class CreateContainerCmdImpl extends AbstrDockerCmd<CreateContainerCmd,CreateContainerResponse> implements CreateContainerCmd
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 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 String getContainerIDFile()
public Integer getCpuPeriod()
getCpuPeriod
in interface CreateContainerCmd
public String getCpuset()
getCpuset
in interface CreateContainerCmd
public String getCpusetMems()
getCpusetMems
in interface CreateContainerCmd
public int 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[] getExtraHosts()
getExtraHosts
in interface CreateContainerCmd
public String getHostName()
getHostName
in interface CreateContainerCmd
public String getImage()
getImage
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 getMemoryLimit()
getMemoryLimit
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 isOomKillDisable()
isOomKillDisable
in interface CreateContainerCmd
public Boolean isPrivileged()
isPrivileged
in interface CreateContainerCmd
public Boolean isPublishAllPorts()
isPublishAllPorts
in interface CreateContainerCmd
public boolean isReadonlyRootfs()
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 CreateContainerCmdImpl withAttachStderr(boolean attachStderr)
withAttachStderr
in interface CreateContainerCmd
public CreateContainerCmdImpl withAttachStdin(boolean attachStdin)
withAttachStdin
in interface CreateContainerCmd
public CreateContainerCmdImpl withAttachStdout(boolean attachStdout)
withAttachStdout
in interface CreateContainerCmd
public CreateContainerCmd withBinds(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 withCapDrop(Capability... capDrop)
CreateContainerCmd
Capability.CHOWN
prevents the container from changing the owner of any
files.withCapDrop
in interface CreateContainerCmd
public CreateContainerCmdImpl withCmd(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 CreateContainerCmdImpl withCpuset(String cpuset)
withCpuset
in interface CreateContainerCmd
public CreateContainerCmd withCpusetMems(String cpusetMems)
withCpusetMems
in interface CreateContainerCmd
public CreateContainerCmdImpl withCpuShares(int cpuShares)
withCpuShares
in interface CreateContainerCmd
public CreateContainerCmd withDevices(Device... devices)
CreateContainerCmd
withDevices
in interface CreateContainerCmd
public CreateContainerCmdImpl withDns(String... dns)
CreateContainerCmd
withDns
in interface CreateContainerCmd
public CreateContainerCmd withDnsSearch(String... dnsSearch)
CreateContainerCmd
withDnsSearch
in interface CreateContainerCmd
public CreateContainerCmdImpl withDomainName(String domainName)
withDomainName
in interface CreateContainerCmd
public CreateContainerCmdImpl withEntrypoint(String... entrypoint)
withEntrypoint
in interface CreateContainerCmd
public CreateContainerCmdImpl withEnv(String... env)
withEnv
in interface CreateContainerCmd
public CreateContainerCmdImpl withExposedPorts(ExposedPort... exposedPorts)
withExposedPorts
in interface CreateContainerCmd
public CreateContainerCmd withExtraHosts(String... extraHosts)
CreateContainerCmd
withExtraHosts
in interface CreateContainerCmd
public CreateContainerCmdImpl withHostName(String hostName)
withHostName
in interface CreateContainerCmd
public CreateContainerCmdImpl withImage(String image)
withImage
in interface CreateContainerCmd
public CreateContainerCmdImpl withLabels(Map<String,String> labels)
withLabels
in interface CreateContainerCmd
public CreateContainerCmdImpl withLinks(Link... links)
CreateContainerCmd
withLinks
in interface CreateContainerCmd
public CreateContainerCmd withLxcConf(LxcConf... lxcConf)
withLxcConf
in interface CreateContainerCmd
public CreateContainerCmd withLogConfig(LogConfig logConfig)
withLogConfig
in interface CreateContainerCmd
public CreateContainerCmdImpl withMacAddress(String macAddress)
withMacAddress
in interface CreateContainerCmd
public CreateContainerCmdImpl withMemoryLimit(long memoryLimit)
withMemoryLimit
in interface CreateContainerCmd
public CreateContainerCmdImpl withMemorySwap(long memorySwap)
withMemorySwap
in interface CreateContainerCmd
public CreateContainerCmdImpl withName(String name)
withName
in interface CreateContainerCmd
public CreateContainerCmdImpl 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(Ports portBindings)
CreateContainerCmd
Ports
object.withPortBindings
in interface CreateContainerCmd
CreateContainerCmd.withPortBindings(PortBinding...)
public CreateContainerCmdImpl withPortSpecs(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 CreateContainerCmdImpl withStdInOnce(boolean stdInOnce)
withStdInOnce
in interface CreateContainerCmd
public CreateContainerCmdImpl withStdinOpen(boolean stdinOpen)
withStdinOpen
in interface CreateContainerCmd
public CreateContainerCmdImpl withTty(boolean tty)
withTty
in interface CreateContainerCmd
public CreateContainerCmd withUlimits(Ulimit[] ulimits)
withUlimits
in interface CreateContainerCmd
public CreateContainerCmdImpl withUser(String user)
withUser
in interface CreateContainerCmd
public CreateContainerCmdImpl withVolumes(Volume... volumes)
withVolumes
in interface CreateContainerCmd
public CreateContainerCmdImpl withVolumesFrom(VolumesFrom... volumesFrom)
withVolumesFrom
in interface CreateContainerCmd
public CreateContainerCmdImpl withWorkingDir(String workingDir)
withWorkingDir
in interface CreateContainerCmd
public CreateContainerCmd withPidMode(String pidMode)
CreateContainerCmd
withPidMode
in interface CreateContainerCmd
Copyright © 2016. All Rights Reserved.