com.github.dockerjava.core.command
Class CommitCmdImpl

java.lang.Object
  extended by com.github.dockerjava.core.command.AbstrDockerCmd<CommitCmd,String>
      extended by 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.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.github.dockerjava.api.command.CommitCmd
CommitCmd.Exec
 
Field Summary
 
Fields inherited from class com.github.dockerjava.core.command.AbstrDockerCmd
execution
 
Constructor Summary
CommitCmdImpl(CommitCmd.Exec exec, String containerId)
           
 
Method Summary
 String exec()
           
 String getAuthor()
           
 String getContainerId()
           
 String[] getEnv()
           
 ExposedPorts getExposedPorts()
           
 String getHostname()
           
 Integer getMemory()
           
 Integer getMemorySwap()
           
 String getMessage()
           
 String[] getPortSpecs()
           
 String getRepository()
           
 String getTag()
           
 String getUser()
           
 Volumes getVolumes()
           
 String getWorkingDir()
           
 boolean hasPauseEnabled()
           
 boolean isOpenStdin()
           
 boolean isStdinOnce()
           
 boolean isTty()
           
 String toString()
           
 CommitCmdImpl withAttachStderr()
           
 CommitCmdImpl withAttachStderr(boolean attachStderr)
           
 CommitCmdImpl withAttachStdin()
           
 CommitCmdImpl withAttachStdin(boolean attachStdin)
           
 CommitCmdImpl withAttachStdout()
           
 CommitCmdImpl withAttachStdout(boolean attachStdout)
           
 CommitCmdImpl withAuthor(String author)
           
 CommitCmdImpl withCmd(String... cmd)
           
 CommitCmdImpl withContainerId(String containerId)
           
 CommitCmdImpl withDisableNetwork(boolean disableNetwork)
           
 CommitCmdImpl withEnv(String... env)
           
 CommitCmdImpl withExposedPorts(ExposedPorts exposedPorts)
           
 CommitCmdImpl withHostname(String hostname)
           
 CommitCmdImpl withMemory(Integer memory)
           
 CommitCmdImpl withMemorySwap(Integer memorySwap)
           
 CommitCmdImpl withMessage(String message)
           
 CommitCmdImpl withOpenStdin(boolean openStdin)
           
 CommitCmdImpl withPause(boolean pause)
           
 CommitCmdImpl withPortSpecs(String... portSpecs)
           
 CommitCmdImpl withRepository(String repository)
           
 CommitCmdImpl withStdinOnce()
           
 CommitCmdImpl withStdinOnce(boolean stdinOnce)
           
 CommitCmdImpl withTag(String tag)
           
 CommitCmdImpl withTty()
           
 CommitCmdImpl withTty(boolean tty)
           
 CommitCmdImpl withUser(String user)
           
 CommitCmdImpl withVolumes(Volumes volumes)
           
 CommitCmdImpl withWorkingDir(String workingDir)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CommitCmdImpl

public CommitCmdImpl(CommitCmd.Exec exec,
                     String containerId)
Method Detail

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.