com.github.dockerjava.api.command
Interface CreateContainerCmd
- All Superinterfaces:
- DockerCmd<CreateContainerResponse>
- All Known Implementing Classes:
- CreateContainerCmdImpl
public interface CreateContainerCmd
- extends DockerCmd<CreateContainerResponse>
withName
CreateContainerCmd withName(String name)
getName
String getName()
withExposedPorts
CreateContainerCmd withExposedPorts(ExposedPort... exposedPorts)
getExposedPorts
ExposedPort[] getExposedPorts()
isDisableNetwork
boolean isDisableNetwork()
getWorkingDir
String getWorkingDir()
withWorkingDir
CreateContainerCmd withWorkingDir(String workingDir)
getHostName
String getHostName()
withDisableNetwork
CreateContainerCmd withDisableNetwork(boolean disableNetwork)
withHostName
CreateContainerCmd withHostName(String hostName)
getPortSpecs
String[] getPortSpecs()
withPortSpecs
CreateContainerCmd withPortSpecs(String... portSpecs)
getUser
String getUser()
withUser
CreateContainerCmd withUser(String user)
isTty
boolean isTty()
withTty
CreateContainerCmd withTty(boolean tty)
isStdinOpen
boolean isStdinOpen()
withStdinOpen
CreateContainerCmd withStdinOpen(boolean stdinOpen)
isStdInOnce
boolean isStdInOnce()
withStdInOnce
CreateContainerCmd withStdInOnce(boolean stdInOnce)
getMemoryLimit
long getMemoryLimit()
withMemoryLimit
CreateContainerCmd withMemoryLimit(long memoryLimit)
getMemorySwap
long getMemorySwap()
withMemorySwap
CreateContainerCmd withMemorySwap(long memorySwap)
getCpuShares
int getCpuShares()
withCpuShares
CreateContainerCmd withCpuShares(int cpuShares)
isAttachStdin
boolean isAttachStdin()
withAttachStdin
CreateContainerCmd withAttachStdin(boolean attachStdin)
isAttachStdout
boolean isAttachStdout()
withAttachStdout
CreateContainerCmd withAttachStdout(boolean attachStdout)
isAttachStderr
boolean isAttachStderr()
withAttachStderr
CreateContainerCmd withAttachStderr(boolean attachStderr)
getEnv
String[] getEnv()
withEnv
CreateContainerCmd withEnv(String... env)
getCmd
String[] getCmd()
withCmd
CreateContainerCmd withCmd(String... cmd)
getDns
String[] getDns()
withDns
CreateContainerCmd withDns(String... dns)
getImage
String getImage()
withImage
CreateContainerCmd withImage(String image)
getVolumes
Volume[] getVolumes()
withVolumes
CreateContainerCmd withVolumes(Volume... volumes)
getVolumesFrom
String[] getVolumesFrom()
withVolumesFrom
CreateContainerCmd withVolumesFrom(String... volumesFrom)
getHostConfig
HostConfig getHostConfig()
withHostConfig
CreateContainerCmd withHostConfig(HostConfig hostConfig)
getCapAdd
Capability[] getCapAdd()
withCapAdd
CreateContainerCmd withCapAdd(Capability... capAdd)
- Add linux kernel
capability to the container. For example: adding
Capability.MKNOD
allows the container to create special files using the 'mknod' command.
getCapDrop
Capability[] getCapDrop()
withCapDrop
CreateContainerCmd withCapDrop(Capability... capDrop)
- Drop linux kernel
capability from the container. For example: dropping
Capability.CHOWN
prevents the container from changing the owner of any files.
exec
CreateContainerResponse exec()
throws NotFoundException,
ConflictException
- Specified by:
exec
in interface DockerCmd<CreateContainerResponse>
- Throws:
NotFoundException
- No such container
ConflictException
- Named container already exists
Copyright © 2014. All Rights Reserved.