|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.kpelykh.docker.client.DockerClient
public class DockerClient
Constructor Summary | |
---|---|
DockerClient()
|
|
DockerClient(String serverUrl)
|
Method Summary | |
---|---|
static String |
asString(com.sun.jersey.api.client.ClientResponse response)
|
void |
auth()
Authenticate with the server, useful for checking authentication. |
AuthConfig |
authConfig()
|
com.sun.jersey.api.client.ClientResponse |
build(File dockerFolder)
|
com.sun.jersey.api.client.ClientResponse |
build(File dockerFolder,
String tag)
|
com.sun.jersey.api.client.ClientResponse |
build(File dockerFolder,
String tag,
boolean noCache)
|
String |
commit(CommitConfig commitConfig)
|
List<ChangeLog> |
containerDiff(String containerId)
|
com.sun.jersey.api.client.ClientResponse |
copyFile(String containerId,
String resource)
|
ContainerCreateResponse |
createContainer(ContainerConfig config)
|
ContainerCreateResponse |
createContainer(ContainerConfig config,
String name)
|
List<Image> |
getImages()
|
List<Image> |
getImages(boolean allContainers)
|
List<Image> |
getImages(String name)
|
List<Image> |
getImages(String name,
boolean allImages)
|
String |
getVizImages()
|
ImageCreateResponse |
importImage(String repository,
String tag,
InputStream imageStream)
Create an image by importing the given stream of a tar file. |
Info |
info()
* MISC API * |
ContainerInspectResponse |
inspectContainer(String containerId)
|
ImageInspectResponse |
inspectImage(String imageId)
|
void |
kill(String containerId)
|
List<Container> |
listContainers(boolean allContainers)
* CONTAINER API * |
List<Container> |
listContainers(boolean allContainers,
boolean latest)
|
List<Container> |
listContainers(boolean allContainers,
boolean latest,
int limit)
|
List<Container> |
listContainers(boolean allContainers,
boolean latest,
int limit,
boolean showSize)
|
List<Container> |
listContainers(boolean allContainers,
boolean latest,
int limit,
boolean showSize,
String since)
|
List<Container> |
listContainers(boolean allContainers,
boolean latest,
int limit,
boolean showSize,
String since,
String before)
|
com.sun.jersey.api.client.ClientResponse |
logContainer(String containerId)
|
com.sun.jersey.api.client.ClientResponse |
logContainerStream(String containerId)
|
int |
ping()
|
com.sun.jersey.api.client.ClientResponse |
pull(String repository)
* IMAGE API * |
com.sun.jersey.api.client.ClientResponse |
pull(String repository,
String tag)
|
com.sun.jersey.api.client.ClientResponse |
pull(String repository,
String tag,
String registry)
|
com.sun.jersey.api.client.ClientResponse |
push(String name)
Push the latest image to the repository. |
void |
removeContainer(String container)
|
void |
removeContainer(String containerId,
boolean removeVolumes)
|
void |
removeContainers(List<String> containers,
boolean removeVolumes)
|
void |
removeImage(String imageId)
Remove an image, deleting any tags it might have. |
void |
removeImages(List<String> images)
|
void |
restart(String containerId,
int timeout)
|
List<SearchItem> |
search(String search)
|
void |
setCredentials(String username,
String password,
String email)
|
void |
startContainer(String containerId)
|
void |
startContainer(String containerId,
HostConfig hostConfig)
|
void |
stopContainer(String containerId)
|
void |
stopContainer(String containerId,
int timeout)
|
int |
tag(String image,
String repository,
String tag,
boolean force)
Tag an image into a repository |
Version |
version()
|
int |
waitContainer(String containerId)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DockerClient() throws DockerException
DockerException
public DockerClient(String serverUrl) throws DockerException
DockerException
Method Detail |
---|
public void setCredentials(String username, String password, String email)
public void auth() throws DockerException
DockerException
public AuthConfig authConfig() throws DockerException
DockerException
public Info info() throws DockerException
DockerException
public Version version() throws DockerException
DockerException
public int ping() throws DockerException
DockerException
public com.sun.jersey.api.client.ClientResponse pull(String repository) throws DockerException
DockerException
public com.sun.jersey.api.client.ClientResponse pull(String repository, String tag) throws DockerException
DockerException
public com.sun.jersey.api.client.ClientResponse pull(String repository, String tag, String registry) throws DockerException
DockerException
public static String asString(com.sun.jersey.api.client.ClientResponse response) throws IOException
IOException
public com.sun.jersey.api.client.ClientResponse push(String name) throws DockerException
name
- The name, e.g. "alexec/busybox" or just "busybox" if you want to default. Not null.
DockerException
public int tag(String image, String repository, String tag, boolean force) throws DockerException
image
- the local image to tag (either a name or an id)repository
- the repository to tag intag
- any tag for this imageforce
- (not documented)
DockerException
public ImageCreateResponse importImage(String repository, String tag, InputStream imageStream) throws DockerException
repository
- the repository to import totag
- any tag for this imageimageStream
- the InputStream of the tar file
ImageCreateResponse
containing the id of the imported image
DockerException
- if the import fails for some reason.public List<SearchItem> search(String search) throws DockerException
DockerException
public void removeImage(String imageId) throws DockerException
DockerException
public void removeImages(List<String> images) throws DockerException
DockerException
public String getVizImages() throws DockerException
DockerException
public List<Image> getImages() throws DockerException
DockerException
public List<Image> getImages(boolean allContainers) throws DockerException
DockerException
public List<Image> getImages(String name) throws DockerException
DockerException
public List<Image> getImages(String name, boolean allImages) throws DockerException
DockerException
public ImageInspectResponse inspectImage(String imageId) throws DockerException, NotFoundException
DockerException
NotFoundException
public List<Container> listContainers(boolean allContainers)
public List<Container> listContainers(boolean allContainers, boolean latest)
public List<Container> listContainers(boolean allContainers, boolean latest, int limit)
public List<Container> listContainers(boolean allContainers, boolean latest, int limit, boolean showSize)
public List<Container> listContainers(boolean allContainers, boolean latest, int limit, boolean showSize, String since)
public List<Container> listContainers(boolean allContainers, boolean latest, int limit, boolean showSize, String since, String before)
public ContainerCreateResponse createContainer(ContainerConfig config) throws DockerException
DockerException
public ContainerCreateResponse createContainer(ContainerConfig config, String name) throws DockerException, NotFoundException
DockerException
NotFoundException
public void startContainer(String containerId) throws DockerException
DockerException
public void startContainer(String containerId, HostConfig hostConfig) throws DockerException, NotFoundException
DockerException
NotFoundException
public ContainerInspectResponse inspectContainer(String containerId) throws DockerException, NotFoundException
DockerException
NotFoundException
public void removeContainer(String container) throws DockerException
DockerException
public void removeContainer(String containerId, boolean removeVolumes) throws DockerException
DockerException
public void removeContainers(List<String> containers, boolean removeVolumes) throws DockerException
DockerException
public int waitContainer(String containerId) throws DockerException, NotFoundException
DockerException
NotFoundException
public com.sun.jersey.api.client.ClientResponse logContainer(String containerId) throws DockerException
DockerException
public com.sun.jersey.api.client.ClientResponse logContainerStream(String containerId) throws DockerException
DockerException
public com.sun.jersey.api.client.ClientResponse copyFile(String containerId, String resource) throws DockerException
DockerException
public List<ChangeLog> containerDiff(String containerId) throws DockerException, NotFoundException
DockerException
NotFoundException
public void stopContainer(String containerId) throws DockerException
DockerException
public void stopContainer(String containerId, int timeout) throws DockerException
DockerException
public void kill(String containerId) throws DockerException
DockerException
public void restart(String containerId, int timeout) throws DockerException, NotFoundException
DockerException
NotFoundException
public String commit(CommitConfig commitConfig) throws DockerException, NotFoundException
DockerException
NotFoundException
public com.sun.jersey.api.client.ClientResponse build(File dockerFolder) throws DockerException
DockerException
public com.sun.jersey.api.client.ClientResponse build(File dockerFolder, String tag) throws DockerException
DockerException
public com.sun.jersey.api.client.ClientResponse build(File dockerFolder, String tag, boolean noCache) throws DockerException
DockerException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |