public class CreateContainerCmdImpl extends AbstrDockerCmd<CreateContainerCmd,CreateContainerResponse> implements CreateContainerCmd
CreateContainerCmd.Exec
execution
Constructor and Description |
---|
CreateContainerCmdImpl(CreateContainerCmd.Exec exec,
String image) |
close
public CreateContainerCmdImpl(CreateContainerCmd.Exec exec, String image)
public CreateContainerCmdImpl withName(String name)
withName
in interface CreateContainerCmd
public String getName()
getName
in interface CreateContainerCmd
public CreateContainerCmdImpl withExposedPorts(ExposedPort... exposedPorts)
withExposedPorts
in interface CreateContainerCmd
public ExposedPort[] getExposedPorts()
getExposedPorts
in interface CreateContainerCmd
public boolean isDisableNetwork()
isDisableNetwork
in interface CreateContainerCmd
public String getWorkingDir()
getWorkingDir
in interface CreateContainerCmd
public CreateContainerCmdImpl withWorkingDir(String workingDir)
withWorkingDir
in interface CreateContainerCmd
public String getHostName()
getHostName
in interface CreateContainerCmd
public CreateContainerCmdImpl withDisableNetwork(boolean disableNetwork)
withDisableNetwork
in interface CreateContainerCmd
public CreateContainerCmdImpl withHostName(String hostName)
withHostName
in interface CreateContainerCmd
public String[] getPortSpecs()
getPortSpecs
in interface CreateContainerCmd
public CreateContainerCmdImpl withPortSpecs(String... portSpecs)
withPortSpecs
in interface CreateContainerCmd
public String getUser()
getUser
in interface CreateContainerCmd
public CreateContainerCmdImpl withUser(String user)
withUser
in interface CreateContainerCmd
public boolean isTty()
isTty
in interface CreateContainerCmd
public CreateContainerCmdImpl withTty(boolean tty)
withTty
in interface CreateContainerCmd
public boolean isStdinOpen()
isStdinOpen
in interface CreateContainerCmd
public CreateContainerCmdImpl withStdinOpen(boolean stdinOpen)
withStdinOpen
in interface CreateContainerCmd
public boolean isStdInOnce()
isStdInOnce
in interface CreateContainerCmd
public CreateContainerCmdImpl withStdInOnce(boolean stdInOnce)
withStdInOnce
in interface CreateContainerCmd
public long getMemoryLimit()
getMemoryLimit
in interface CreateContainerCmd
public CreateContainerCmdImpl withMemoryLimit(long memoryLimit)
withMemoryLimit
in interface CreateContainerCmd
public long getMemorySwap()
getMemorySwap
in interface CreateContainerCmd
public CreateContainerCmdImpl withMemorySwap(long memorySwap)
withMemorySwap
in interface CreateContainerCmd
public int getCpuShares()
getCpuShares
in interface CreateContainerCmd
public CreateContainerCmdImpl withCpuShares(int cpuShares)
withCpuShares
in interface CreateContainerCmd
public String getCpuset()
getCpuset
in interface CreateContainerCmd
public CreateContainerCmdImpl withCpuset(String cpuset)
withCpuset
in interface CreateContainerCmd
public boolean isAttachStdin()
isAttachStdin
in interface CreateContainerCmd
public CreateContainerCmdImpl withAttachStdin(boolean attachStdin)
withAttachStdin
in interface CreateContainerCmd
public boolean isAttachStdout()
isAttachStdout
in interface CreateContainerCmd
public CreateContainerCmdImpl withAttachStdout(boolean attachStdout)
withAttachStdout
in interface CreateContainerCmd
public boolean isAttachStderr()
isAttachStderr
in interface CreateContainerCmd
public CreateContainerCmdImpl withAttachStderr(boolean attachStderr)
withAttachStderr
in interface CreateContainerCmd
public String[] getEnv()
getEnv
in interface CreateContainerCmd
public CreateContainerCmdImpl withEnv(String... env)
withEnv
in interface CreateContainerCmd
public String[] getCmd()
getCmd
in interface CreateContainerCmd
public CreateContainerCmdImpl withCmd(String... cmd)
withCmd
in interface CreateContainerCmd
public String[] getEntrypoint()
getEntrypoint
in interface CreateContainerCmd
public CreateContainerCmdImpl withEntrypoint(String... entrypoint)
withEntrypoint
in interface CreateContainerCmd
public String[] getDns()
getDns
in interface CreateContainerCmd
public CreateContainerCmdImpl withDns(String... dns)
withDns
in interface CreateContainerCmd
public String getImage()
getImage
in interface CreateContainerCmd
public CreateContainerCmdImpl withImage(String image)
withImage
in interface CreateContainerCmd
public Volume[] getVolumes()
getVolumes
in interface CreateContainerCmd
public CreateContainerCmdImpl withVolumes(Volume... volumes)
withVolumes
in interface CreateContainerCmd
public VolumesFrom[] getVolumesFrom()
getVolumesFrom
in interface CreateContainerCmd
public CreateContainerCmdImpl withVolumesFrom(VolumesFrom... volumesFrom)
withVolumesFrom
in interface CreateContainerCmd
public HostConfig getHostConfig()
getHostConfig
in interface CreateContainerCmd
public CreateContainerCmd withHostConfig(HostConfig hostConfig)
withHostConfig
in interface CreateContainerCmd
public Capability[] getCapAdd()
getCapAdd
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 Capability[] getCapDrop()
getCapDrop
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 CreateContainerResponse exec() throws NotFoundException, ConflictException
exec
in interface CreateContainerCmd
exec
in interface DockerCmd<CreateContainerResponse>
exec
in class AbstrDockerCmd<CreateContainerCmd,CreateContainerResponse>
NotFoundException
- No such containerConflictException
- Named container already existsCopyright © 2015. All Rights Reserved.