com.github.dockerjava.core
Class DockerClientImpl

java.lang.Object
  extended by com.github.dockerjava.core.DockerClientImpl
All Implemented Interfaces:
DockerClient, Closeable

public class DockerClientImpl
extends Object
implements Closeable, DockerClient

Author:
Konstantin Pelykh ([email protected])
See Also:
https://github.com/docker/docker/blob/master/api/client/commands.go

Method Summary
 AttachContainerCmd attachContainerCmd(String containerId)
           
 AuthCmd authCmd()
          Authenticate with the server, useful for checking authentication.
 AuthConfig authConfig()
           
 BuildImageCmd buildImageCmd(File dockerFolder)
           
 BuildImageCmd buildImageCmd(InputStream tarInputStream)
           
 void close()
           
 CommitCmd commitCmd(String containerId)
           
 ContainerDiffCmd containerDiffCmd(String containerId)
           
 CopyFileFromContainerCmd copyFileFromContainerCmd(String containerId, String resource)
           
 CreateContainerCmd createContainerCmd(String image)
           
 CreateImageCmd createImageCmd(String repository, InputStream imageStream)
           
 EventsCmd eventsCmd(EventCallback eventCallback)
           
static DockerClientImpl getInstance()
           
static DockerClientImpl getInstance(DockerClientConfig dockerClientConfig)
           
static DockerClientImpl getInstance(String serverUrl)
           
 InfoCmd infoCmd()
           
 InspectContainerCmd inspectContainerCmd(String containerId)
           
 InspectImageCmd inspectImageCmd(String imageId)
           
 KillContainerCmd killContainerCmd(String containerId)
           
 ListContainersCmd listContainersCmd()
          * CONTAINER API *
 ListImagesCmd listImagesCmd()
           
 LogContainerCmd logContainerCmd(String containerId)
           
 PauseContainerCmd pauseContainerCmd(String containerId)
           
 PingCmd pingCmd()
           
 PullImageCmd pullImageCmd(String repository)
          * IMAGE API *
 PushImageCmd pushImageCmd(String name)
           
 RemoveContainerCmd removeContainerCmd(String containerId)
           
 RemoveImageCmd removeImageCmd(String imageId)
           
 RestartContainerCmd restartContainerCmd(String containerId)
           
 SearchImagesCmd searchImagesCmd(String term)
           
 StartContainerCmd startContainerCmd(String containerId)
           
 StopContainerCmd stopContainerCmd(String containerId)
           
 TagImageCmd tagImageCmd(String imageId, String repository, String tag)
           
 TopContainerCmd topContainerCmd(String containerId)
           
 UnpauseContainerCmd unpauseContainerCmd(String containerId)
           
 VersionCmd versionCmd()
           
 WaitContainerCmd waitContainerCmd(String containerId)
           
 DockerClientImpl withDockerCmdExecFactory(DockerCmdExecFactory dockerCmdExecFactory)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static DockerClientImpl getInstance()

getInstance

public static DockerClientImpl getInstance(DockerClientConfig dockerClientConfig)

getInstance

public static DockerClientImpl getInstance(String serverUrl)

withDockerCmdExecFactory

public DockerClientImpl withDockerCmdExecFactory(DockerCmdExecFactory dockerCmdExecFactory)

authConfig

public AuthConfig authConfig()
Specified by:
authConfig in interface DockerClient

authCmd

public AuthCmd authCmd()
Authenticate with the server, useful for checking authentication.

Specified by:
authCmd in interface DockerClient

infoCmd

public InfoCmd infoCmd()
Specified by:
infoCmd in interface DockerClient

pingCmd

public PingCmd pingCmd()
Specified by:
pingCmd in interface DockerClient

versionCmd

public VersionCmd versionCmd()
Specified by:
versionCmd in interface DockerClient

pullImageCmd

public PullImageCmd pullImageCmd(String repository)
* IMAGE API *

Specified by:
pullImageCmd in interface DockerClient

pushImageCmd

public PushImageCmd pushImageCmd(String name)
Specified by:
pushImageCmd in interface DockerClient

createImageCmd

public CreateImageCmd createImageCmd(String repository,
                                     InputStream imageStream)
Specified by:
createImageCmd in interface DockerClient

searchImagesCmd

public SearchImagesCmd searchImagesCmd(String term)
Specified by:
searchImagesCmd in interface DockerClient

removeImageCmd

public RemoveImageCmd removeImageCmd(String imageId)
Specified by:
removeImageCmd in interface DockerClient

listImagesCmd

public ListImagesCmd listImagesCmd()
Specified by:
listImagesCmd in interface DockerClient

inspectImageCmd

public InspectImageCmd inspectImageCmd(String imageId)
Specified by:
inspectImageCmd in interface DockerClient

listContainersCmd

public ListContainersCmd listContainersCmd()
* CONTAINER API *

Specified by:
listContainersCmd in interface DockerClient

createContainerCmd

public CreateContainerCmd createContainerCmd(String image)
Specified by:
createContainerCmd in interface DockerClient

startContainerCmd

public StartContainerCmd startContainerCmd(String containerId)
Specified by:
startContainerCmd in interface DockerClient

inspectContainerCmd

public InspectContainerCmd inspectContainerCmd(String containerId)
Specified by:
inspectContainerCmd in interface DockerClient

removeContainerCmd

public RemoveContainerCmd removeContainerCmd(String containerId)
Specified by:
removeContainerCmd in interface DockerClient

waitContainerCmd

public WaitContainerCmd waitContainerCmd(String containerId)
Specified by:
waitContainerCmd in interface DockerClient

attachContainerCmd

public AttachContainerCmd attachContainerCmd(String containerId)
Specified by:
attachContainerCmd in interface DockerClient

logContainerCmd

public LogContainerCmd logContainerCmd(String containerId)
Specified by:
logContainerCmd in interface DockerClient

copyFileFromContainerCmd

public CopyFileFromContainerCmd copyFileFromContainerCmd(String containerId,
                                                         String resource)
Specified by:
copyFileFromContainerCmd in interface DockerClient

containerDiffCmd

public ContainerDiffCmd containerDiffCmd(String containerId)
Specified by:
containerDiffCmd in interface DockerClient

stopContainerCmd

public StopContainerCmd stopContainerCmd(String containerId)
Specified by:
stopContainerCmd in interface DockerClient

killContainerCmd

public KillContainerCmd killContainerCmd(String containerId)
Specified by:
killContainerCmd in interface DockerClient

restartContainerCmd

public RestartContainerCmd restartContainerCmd(String containerId)
Specified by:
restartContainerCmd in interface DockerClient

commitCmd

public CommitCmd commitCmd(String containerId)
Specified by:
commitCmd in interface DockerClient

buildImageCmd

public BuildImageCmd buildImageCmd(File dockerFolder)
Specified by:
buildImageCmd in interface DockerClient

buildImageCmd

public BuildImageCmd buildImageCmd(InputStream tarInputStream)
Specified by:
buildImageCmd in interface DockerClient

topContainerCmd

public TopContainerCmd topContainerCmd(String containerId)
Specified by:
topContainerCmd in interface DockerClient

tagImageCmd

public TagImageCmd tagImageCmd(String imageId,
                               String repository,
                               String tag)
Specified by:
tagImageCmd in interface DockerClient

pauseContainerCmd

public PauseContainerCmd pauseContainerCmd(String containerId)
Specified by:
pauseContainerCmd in interface DockerClient

unpauseContainerCmd

public UnpauseContainerCmd unpauseContainerCmd(String containerId)
Specified by:
unpauseContainerCmd in interface DockerClient

eventsCmd

public EventsCmd eventsCmd(EventCallback eventCallback)
Specified by:
eventsCmd in interface DockerClient

close

public void close()
           throws IOException
Specified by:
close in interface DockerClient
Specified by:
close in interface Closeable
Throws:
IOException


Copyright © 2014. All rights reserved.