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,
AuthConfig authConfig,
java.lang.String image) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
CreateContainerResponse |
exec() |
java.util.List<java.lang.String> |
getAliases() |
java.lang.Boolean |
getArgsEscaped() |
AuthConfig |
getAuthConfig() |
java.lang.String[] |
getCmd() |
java.lang.String |
getDomainName() |
java.lang.String[] |
getEntrypoint() |
java.lang.String[] |
getEnv() |
ExposedPort[] |
getExposedPorts() |
HealthCheck |
getHealthcheck() |
HostConfig |
getHostConfig() |
java.lang.String |
getHostName() |
java.lang.String |
getImage() |
java.lang.String |
getIpv4Address() |
java.lang.String |
getIpv6Address() |
java.util.Map<java.lang.String,java.lang.String> |
getLabels() |
java.lang.String |
getMacAddress() |
java.lang.String |
getName() |
java.util.List<java.lang.String> |
getOnBuild() |
java.lang.String[] |
getPortSpecs() |
java.lang.String |
getStopSignal() |
java.lang.Integer |
getStopTimeout() |
java.lang.String |
getUser() |
Volume[] |
getVolumes() |
java.lang.String |
getWorkingDir() |
int |
hashCode() |
java.lang.Boolean |
isAttachStderr() |
java.lang.Boolean |
isAttachStdin() |
java.lang.Boolean |
isAttachStdout() |
java.lang.Boolean |
isNetworkDisabled() |
java.lang.Boolean |
isStdInOnce() |
java.lang.Boolean |
isStdinOpen() |
java.lang.Boolean |
isTty() |
java.lang.String |
toString() |
CreateContainerCmd |
withAliases(java.util.List<java.lang.String> aliases)
Add network-scoped alias for the container
|
CreateContainerCmd |
withAliases(java.lang.String... aliases)
Add network-scoped alias for the container
|
CreateContainerCmdImpl |
withArgsEscaped(java.lang.Boolean argsEscaped) |
CreateContainerCmd |
withAttachStderr(java.lang.Boolean attachStderr) |
CreateContainerCmd |
withAttachStdin(java.lang.Boolean attachStdin) |
CreateContainerCmd |
withAttachStdout(java.lang.Boolean attachStdout) |
CreateContainerCmd |
withAuthConfig(AuthConfig authConfig)
While using swarm classic, you can provide an optional auth config which will be used to pull images from a private registry,
if the swarm node does not already have the docker image.
|
CreateContainerCmd |
withCmd(java.util.List<java.lang.String> cmd) |
CreateContainerCmd |
withCmd(java.lang.String... cmd) |
CreateContainerCmd |
withDomainName(java.lang.String domainName) |
CreateContainerCmd |
withEntrypoint(java.util.List<java.lang.String> entrypoint) |
CreateContainerCmd |
withEntrypoint(java.lang.String... entrypoint) |
CreateContainerCmd |
withEnv(java.util.List<java.lang.String> env) |
CreateContainerCmd |
withEnv(java.lang.String... env) |
CreateContainerCmd |
withExposedPorts(ExposedPort... exposedPorts) |
CreateContainerCmd |
withExposedPorts(java.util.List<ExposedPort> exposedPorts) |
CreateContainerCmdImpl |
withHealthcheck(HealthCheck healthcheck) |
CreateContainerCmd |
withHostConfig(HostConfig hostConfig) |
CreateContainerCmd |
withHostName(java.lang.String hostName) |
CreateContainerCmd |
withImage(java.lang.String image) |
CreateContainerCmd |
withIpv4Address(java.lang.String ipv4Address) |
CreateContainerCmd |
withIpv6Address(java.lang.String ipv6Address) |
CreateContainerCmd |
withLabels(java.util.Map<java.lang.String,java.lang.String> labels) |
CreateContainerCmd |
withMacAddress(java.lang.String macAddress) |
CreateContainerCmd |
withName(java.lang.String name) |
CreateContainerCmd |
withNetworkDisabled(java.lang.Boolean disableNetwork) |
CreateContainerCmdImpl |
withOnBuild(java.util.List<java.lang.String> onBuild) |
CreateContainerCmd |
withPortSpecs(java.util.List<java.lang.String> portSpecs) |
CreateContainerCmd |
withPortSpecs(java.lang.String... portSpecs) |
CreateContainerCmd |
withStdInOnce(java.lang.Boolean stdInOnce) |
CreateContainerCmd |
withStdinOpen(java.lang.Boolean stdinOpen) |
CreateContainerCmd |
withStopSignal(java.lang.String stopSignal) |
CreateContainerCmd |
withStopTimeout(java.lang.Integer stopTimeout) |
CreateContainerCmd |
withTty(java.lang.Boolean tty) |
CreateContainerCmd |
withUser(java.lang.String user) |
CreateContainerCmd |
withVolumes(java.util.List<Volume> volumes) |
CreateContainerCmd |
withVolumes(Volume... volumes) |
CreateContainerCmd |
withWorkingDir(java.lang.String workingDir) |
close, registryAuth
public CreateContainerCmdImpl(CreateContainerCmd.Exec exec, AuthConfig authConfig, java.lang.String image)
public AuthConfig getAuthConfig()
getAuthConfig
in interface CreateContainerCmd
public CreateContainerCmd withAuthConfig(AuthConfig authConfig)
CreateContainerCmd
withAuthConfig
in interface CreateContainerCmd
authConfig
- The optional auth configpublic java.util.List<java.lang.String> getAliases()
getAliases
in interface CreateContainerCmd
public CreateContainerCmd withAliases(java.lang.String... aliases)
CreateContainerCmd
withAliases
in interface CreateContainerCmd
aliases
- on ore more aliasespublic CreateContainerCmd withAliases(java.util.List<java.lang.String> aliases)
CreateContainerCmd
withAliases
in interface CreateContainerCmd
aliases
- on ore more aliasespublic java.lang.String[] getCmd()
getCmd
in interface CreateContainerCmd
public CreateContainerCmd withCmd(java.lang.String... cmd)
withCmd
in interface CreateContainerCmd
public CreateContainerCmd withCmd(java.util.List<java.lang.String> cmd)
withCmd
in interface CreateContainerCmd
@CheckForNull public HealthCheck getHealthcheck()
getHealthcheck
in interface CreateContainerCmd
public CreateContainerCmdImpl withHealthcheck(HealthCheck healthcheck)
withHealthcheck
in interface CreateContainerCmd
public java.lang.Boolean getArgsEscaped()
getArgsEscaped
in interface CreateContainerCmd
public CreateContainerCmdImpl withArgsEscaped(java.lang.Boolean argsEscaped)
withArgsEscaped
in interface CreateContainerCmd
public java.lang.String getDomainName()
getDomainName
in interface CreateContainerCmd
public CreateContainerCmd withDomainName(java.lang.String domainName)
withDomainName
in interface CreateContainerCmd
public java.lang.String[] getEntrypoint()
getEntrypoint
in interface CreateContainerCmd
public CreateContainerCmd withEntrypoint(java.lang.String... entrypoint)
withEntrypoint
in interface CreateContainerCmd
public CreateContainerCmd withEntrypoint(java.util.List<java.lang.String> entrypoint)
withEntrypoint
in interface CreateContainerCmd
public java.lang.String[] getEnv()
getEnv
in interface CreateContainerCmd
public CreateContainerCmd withEnv(java.lang.String... env)
withEnv
in interface CreateContainerCmd
public CreateContainerCmd withEnv(java.util.List<java.lang.String> env)
withEnv
in interface CreateContainerCmd
public ExposedPort[] getExposedPorts()
getExposedPorts
in interface CreateContainerCmd
public CreateContainerCmd withExposedPorts(ExposedPort... exposedPorts)
withExposedPorts
in interface CreateContainerCmd
public CreateContainerCmd withExposedPorts(java.util.List<ExposedPort> exposedPorts)
withExposedPorts
in interface CreateContainerCmd
public java.lang.String getStopSignal()
getStopSignal
in interface CreateContainerCmd
stopSignal
public CreateContainerCmd withStopSignal(java.lang.String stopSignal)
withStopSignal
in interface CreateContainerCmd
public java.lang.Integer getStopTimeout()
getStopTimeout
in interface CreateContainerCmd
public CreateContainerCmd withStopTimeout(java.lang.Integer stopTimeout)
withStopTimeout
in interface CreateContainerCmd
public java.lang.String getHostName()
getHostName
in interface CreateContainerCmd
public CreateContainerCmd withHostName(java.lang.String hostName)
withHostName
in interface CreateContainerCmd
public java.lang.String getImage()
getImage
in interface CreateContainerCmd
public CreateContainerCmd withImage(java.lang.String image)
withImage
in interface CreateContainerCmd
public java.util.Map<java.lang.String,java.lang.String> getLabels()
getLabels
in interface CreateContainerCmd
public CreateContainerCmd withLabels(java.util.Map<java.lang.String,java.lang.String> labels)
withLabels
in interface CreateContainerCmd
public java.lang.String getMacAddress()
getMacAddress
in interface CreateContainerCmd
public CreateContainerCmd withMacAddress(java.lang.String macAddress)
withMacAddress
in interface CreateContainerCmd
public java.lang.String getName()
getName
in interface CreateContainerCmd
public CreateContainerCmd withName(java.lang.String name)
withName
in interface CreateContainerCmd
public java.lang.String[] getPortSpecs()
getPortSpecs
in interface CreateContainerCmd
public CreateContainerCmd withPortSpecs(java.lang.String... portSpecs)
withPortSpecs
in interface CreateContainerCmd
public CreateContainerCmd withPortSpecs(java.util.List<java.lang.String> portSpecs)
withPortSpecs
in interface CreateContainerCmd
public java.lang.String getUser()
getUser
in interface CreateContainerCmd
public CreateContainerCmd withUser(java.lang.String user)
withUser
in interface CreateContainerCmd
public java.lang.Boolean isAttachStderr()
isAttachStderr
in interface CreateContainerCmd
public CreateContainerCmd withAttachStderr(java.lang.Boolean attachStderr)
withAttachStderr
in interface CreateContainerCmd
public java.lang.Boolean isAttachStdin()
isAttachStdin
in interface CreateContainerCmd
public CreateContainerCmd withAttachStdin(java.lang.Boolean attachStdin)
withAttachStdin
in interface CreateContainerCmd
public java.lang.Boolean isAttachStdout()
isAttachStdout
in interface CreateContainerCmd
public CreateContainerCmd withAttachStdout(java.lang.Boolean attachStdout)
withAttachStdout
in interface CreateContainerCmd
public Volume[] getVolumes()
getVolumes
in interface CreateContainerCmd
public CreateContainerCmd withVolumes(Volume... volumes)
withVolumes
in interface CreateContainerCmd
public CreateContainerCmd withVolumes(java.util.List<Volume> volumes)
withVolumes
in interface CreateContainerCmd
public java.lang.String getWorkingDir()
getWorkingDir
in interface CreateContainerCmd
public CreateContainerCmd withWorkingDir(java.lang.String workingDir)
withWorkingDir
in interface CreateContainerCmd
public java.lang.Boolean isNetworkDisabled()
isNetworkDisabled
in interface CreateContainerCmd
public CreateContainerCmd withNetworkDisabled(java.lang.Boolean disableNetwork)
withNetworkDisabled
in interface CreateContainerCmd
public java.lang.Boolean isStdInOnce()
isStdInOnce
in interface CreateContainerCmd
public CreateContainerCmd withStdInOnce(java.lang.Boolean stdInOnce)
withStdInOnce
in interface CreateContainerCmd
public java.lang.Boolean isStdinOpen()
isStdinOpen
in interface CreateContainerCmd
public CreateContainerCmd withStdinOpen(java.lang.Boolean stdinOpen)
withStdinOpen
in interface CreateContainerCmd
public java.lang.Boolean isTty()
isTty
in interface CreateContainerCmd
public CreateContainerCmd withTty(java.lang.Boolean tty)
withTty
in interface CreateContainerCmd
public HostConfig getHostConfig()
getHostConfig
in interface CreateContainerCmd
public CreateContainerCmd withHostConfig(HostConfig hostConfig)
withHostConfig
in interface CreateContainerCmd
public java.lang.String getIpv4Address()
getIpv4Address
in interface CreateContainerCmd
public CreateContainerCmd withIpv4Address(java.lang.String ipv4Address)
withIpv4Address
in interface CreateContainerCmd
public java.lang.String getIpv6Address()
getIpv6Address
in interface CreateContainerCmd
public CreateContainerCmd withIpv6Address(java.lang.String ipv6Address)
withIpv6Address
in interface CreateContainerCmd
@CheckForNull public java.util.List<java.lang.String> getOnBuild()
getOnBuild
in interface CreateContainerCmd
public CreateContainerCmdImpl withOnBuild(java.util.List<java.lang.String> onBuild)
withOnBuild
in interface CreateContainerCmd
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 java.lang.String toString()
toString
in class AbstrDockerCmd<CreateContainerCmd,CreateContainerResponse>
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Copyright © 2019. All Rights Reserved.