com.github.dockerjava.core.command
Class CommitCmdImpl
java.lang.Object
com.github.dockerjava.core.command.AbstrDockerCmd<CommitCmd,String>
com.github.dockerjava.core.command.CommitCmdImpl
- All Implemented Interfaces:
- CommitCmd, DockerCmd<String>
public class CommitCmdImpl
- extends AbstrDockerCmd<CommitCmd,String>
- implements CommitCmd
Create a new image from a container's changes. Returns the new image ID.
CommitCmdImpl
public CommitCmdImpl(CommitCmd.Exec exec,
String containerId)
getContainerId
public String getContainerId()
- Specified by:
getContainerId
in interface CommitCmd
withContainerId
public CommitCmdImpl withContainerId(String containerId)
- Specified by:
withContainerId
in interface CommitCmd
getRepository
public String getRepository()
- Specified by:
getRepository
in interface CommitCmd
getTag
public String getTag()
- Specified by:
getTag
in interface CommitCmd
getMessage
public String getMessage()
- Specified by:
getMessage
in interface CommitCmd
getAuthor
public String getAuthor()
- Specified by:
getAuthor
in interface CommitCmd
hasPauseEnabled
public boolean hasPauseEnabled()
- Specified by:
hasPauseEnabled
in interface CommitCmd
withAttachStderr
public CommitCmdImpl withAttachStderr(boolean attachStderr)
- Specified by:
withAttachStderr
in interface CommitCmd
withAttachStderr
public CommitCmdImpl withAttachStderr()
- Specified by:
withAttachStderr
in interface CommitCmd
withAttachStdin
public CommitCmdImpl withAttachStdin(boolean attachStdin)
- Specified by:
withAttachStdin
in interface CommitCmd
withAttachStdin
public CommitCmdImpl withAttachStdin()
- Specified by:
withAttachStdin
in interface CommitCmd
withAttachStdout
public CommitCmdImpl withAttachStdout(boolean attachStdout)
- Specified by:
withAttachStdout
in interface CommitCmd
withAttachStdout
public CommitCmdImpl withAttachStdout()
- Specified by:
withAttachStdout
in interface CommitCmd
withCmd
public CommitCmdImpl withCmd(String... cmd)
- Specified by:
withCmd
in interface CommitCmd
withDisableNetwork
public CommitCmdImpl withDisableNetwork(boolean disableNetwork)
- Specified by:
withDisableNetwork
in interface CommitCmd
withAuthor
public CommitCmdImpl withAuthor(String author)
- Specified by:
withAuthor
in interface CommitCmd
withMessage
public CommitCmdImpl withMessage(String message)
- Specified by:
withMessage
in interface CommitCmd
withTag
public CommitCmdImpl withTag(String tag)
- Specified by:
withTag
in interface CommitCmd
withRepository
public CommitCmdImpl withRepository(String repository)
- Specified by:
withRepository
in interface CommitCmd
withPause
public CommitCmdImpl withPause(boolean pause)
- Specified by:
withPause
in interface CommitCmd
getEnv
public String[] getEnv()
- Specified by:
getEnv
in interface CommitCmd
withEnv
public CommitCmdImpl withEnv(String... env)
- Specified by:
withEnv
in interface CommitCmd
getExposedPorts
public ExposedPorts getExposedPorts()
- Specified by:
getExposedPorts
in interface CommitCmd
withExposedPorts
public CommitCmdImpl withExposedPorts(ExposedPorts exposedPorts)
- Specified by:
withExposedPorts
in interface CommitCmd
getHostname
public String getHostname()
- Specified by:
getHostname
in interface CommitCmd
withHostname
public CommitCmdImpl withHostname(String hostname)
- Specified by:
withHostname
in interface CommitCmd
getMemory
public Integer getMemory()
- Specified by:
getMemory
in interface CommitCmd
withMemory
public CommitCmdImpl withMemory(Integer memory)
- Specified by:
withMemory
in interface CommitCmd
getMemorySwap
public Integer getMemorySwap()
- Specified by:
getMemorySwap
in interface CommitCmd
withMemorySwap
public CommitCmdImpl withMemorySwap(Integer memorySwap)
- Specified by:
withMemorySwap
in interface CommitCmd
isOpenStdin
public boolean isOpenStdin()
- Specified by:
isOpenStdin
in interface CommitCmd
withOpenStdin
public CommitCmdImpl withOpenStdin(boolean openStdin)
- Specified by:
withOpenStdin
in interface CommitCmd
getPortSpecs
public String[] getPortSpecs()
- Specified by:
getPortSpecs
in interface CommitCmd
withPortSpecs
public CommitCmdImpl withPortSpecs(String... portSpecs)
- Specified by:
withPortSpecs
in interface CommitCmd
isStdinOnce
public boolean isStdinOnce()
- Specified by:
isStdinOnce
in interface CommitCmd
withStdinOnce
public CommitCmdImpl withStdinOnce(boolean stdinOnce)
- Specified by:
withStdinOnce
in interface CommitCmd
withStdinOnce
public CommitCmdImpl withStdinOnce()
- Specified by:
withStdinOnce
in interface CommitCmd
isTty
public boolean isTty()
- Specified by:
isTty
in interface CommitCmd
withTty
public CommitCmdImpl withTty(boolean tty)
- Specified by:
withTty
in interface CommitCmd
withTty
public CommitCmdImpl withTty()
- Specified by:
withTty
in interface CommitCmd
getUser
public String getUser()
- Specified by:
getUser
in interface CommitCmd
withUser
public CommitCmdImpl withUser(String user)
- Specified by:
withUser
in interface CommitCmd
getVolumes
public Volumes getVolumes()
- Specified by:
getVolumes
in interface CommitCmd
withVolumes
public CommitCmdImpl withVolumes(Volumes volumes)
- Specified by:
withVolumes
in interface CommitCmd
getWorkingDir
public String getWorkingDir()
- Specified by:
getWorkingDir
in interface CommitCmd
withWorkingDir
public CommitCmdImpl withWorkingDir(String workingDir)
- Specified by:
withWorkingDir
in interface CommitCmd
toString
public String toString()
- Overrides:
toString
in class Object
exec
public String exec()
throws NotFoundException
- Specified by:
exec
in interface CommitCmd
- Specified by:
exec
in interface DockerCmd<String>
- Overrides:
exec
in class AbstrDockerCmd<CommitCmd,String>
- Throws:
NotFoundException
- No such container
Copyright © 2014. All Rights Reserved.