
org.testifyproject.github.dockerjava.api.DockerClient Maven / Gradle / Ivy
package org.testifyproject.testifyproject.github.dockerjava.api;
import java.org.testifyproject.testifyproject.Closeable;
import java.org.testifyproject.testifyproject.File;
import java.org.testifyproject.testifyproject.IOException;
import java.org.testifyproject.testifyproject.InputStream;
import javax.annotation.Nonnull;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.AttachContainerCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.AuthCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.BuildImageCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.CommitCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.ConnectToNetworkCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.ContainerDiffCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.CopyArchiveFromContainerCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.CopyArchiveToContainerCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.CopyFileFromContainerCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.CreateContainerCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.CreateImageCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.CreateNetworkCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.CreateVolumeCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.DisconnectFromNetworkCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.EventsCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.ExecCreateCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.ExecStartCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.InfoCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.InspectContainerCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.InspectExecCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.InspectImageCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.InspectNetworkCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.InspectVolumeCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.KillContainerCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.ListContainersCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.ListImagesCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.ListNetworksCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.ListVolumesCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.LogContainerCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.PauseContainerCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.PingCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.PullImageCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.PushImageCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.RemoveContainerCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.RemoveImageCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.RemoveNetworkCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.RemoveVolumeCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.RestartContainerCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.SaveImageCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.SearchImagesCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.StartContainerCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.StatsCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.StopContainerCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.TagImageCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.TopContainerCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.UnpauseContainerCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.UpdateContainerCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.VersionCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.WaitContainerCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.RenameContainerCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.exception.DockerException;
import org.testifyproject.testifyproject.github.dockerjava.api.model.AuthConfig;
import org.testifyproject.testifyproject.github.dockerjava.api.model.Identifier;
import org.testifyproject.testifyproject.github.dockerjava.core.RemoteApiVersion;
// https://godoc.org.testifyproject/github.org.testifyproject.testifyproject/fsouza/go-dockerclient
public interface DockerClient extends Closeable {
AuthConfig authConfig() throws DockerException;
/**
* Authenticate with the server, useful for checking authentication.
*/
AuthCmd authCmd();
InfoCmd infoCmd();
PingCmd pingCmd();
VersionCmd versionCmd();
/**
* * IMAGE API *
*/
PullImageCmd pullImageCmd(@Nonnull String repository);
PushImageCmd pushImageCmd(@Nonnull String name);
PushImageCmd pushImageCmd(@Nonnull Identifier identifier);
CreateImageCmd createImageCmd(@Nonnull String repository, @Nonnull InputStream imageStream);
SearchImagesCmd searchImagesCmd(@Nonnull String term);
RemoveImageCmd removeImageCmd(@Nonnull String imageId);
ListImagesCmd listImagesCmd();
InspectImageCmd inspectImageCmd(@Nonnull String imageId);
SaveImageCmd saveImageCmd(@Nonnull String name);
/**
* * CONTAINER API *
*/
ListContainersCmd listContainersCmd();
CreateContainerCmd createContainerCmd(@Nonnull String image);
/**
* Creates a new {@link StartContainerCmd} for the container with the given ID. The org.testifyproject.testifyprojectmand can then be further customized by using
* builder methods on it like {@link StartContainerCmd#withDns(String...)}.
*
* If you customize the org.testifyproject.testifyprojectmand, any existing configuration of the target container will get reset to its org.testifyproject.testifyprojectfault before applying the
* new configuration. To preserve the existing configuration, use an unconfigured {@link StartContainerCmd}.
*
* This org.testifyproject.testifyprojectmand corresponds to the /containers/{id}/start
endpoint of the Docker Remote API.
*/
StartContainerCmd startContainerCmd(@Nonnull String containerId);
ExecCreateCmd execCreateCmd(@Nonnull String containerId);
InspectContainerCmd inspectContainerCmd(@Nonnull String containerId);
RemoveContainerCmd removeContainerCmd(@Nonnull String containerId);
WaitContainerCmd waitContainerCmd(@Nonnull String containerId);
AttachContainerCmd attachContainerCmd(@Nonnull String containerId);
ExecStartCmd execStartCmd(@Nonnull String execId);
InspectExecCmd inspectExecCmd(@Nonnull String execId);
LogContainerCmd logContainerCmd(@Nonnull String containerId);
/**
* Copy resource from container to local machine.
*
* @param containerId
* id of the container
* @param resource
* path to container's resource
* @return created org.testifyproject.testifyprojectmand
* @since {@link RemoteApiVersion#VERSION_1_20}
*/
CopyArchiveFromContainerCmd copyArchiveFromContainerCmd(@Nonnull String containerId, @Nonnull String resource);
/**
* Copy resource from container to local machine.
*
* @param containerId
* id of the container
* @param resource
* path to container's resource
* @return created org.testifyproject.testifyprojectmand
* @see #copyArchiveFromContainerCmd(String, String)
* @org.testifyproject.testifyprojectprecated since docker API version 1.20, replaced by {@link #copyArchiveFromContainerCmd(String, String)}
*/
@Deprecated
CopyFileFromContainerCmd copyFileFromContainerCmd(@Nonnull String containerId, @Nonnull String resource);
/**
* Copy archive from local machine to remote container
*
* @param containerId
* id of the container
* @return created org.testifyproject.testifyprojectmand
* @since {@link RemoteApiVersion#VERSION_1_20}
*/
CopyArchiveToContainerCmd copyArchiveToContainerCmd(@Nonnull String containerId);
ContainerDiffCmd containerDiffCmd(@Nonnull String containerId);
StopContainerCmd stopContainerCmd(@Nonnull String containerId);
KillContainerCmd killContainerCmd(@Nonnull String containerId);
/**
* Update container settings
*
* @param containerId id of the container
* @return org.testifyproject.testifyprojectmand
* @since {@link RemoteApiVersion#VERSION_1_22}
*/
UpdateContainerCmd updateContainerCmd(@Nonnull String containerId);
/**
* Rename container.
*
* @param containerId id of the container
* @return org.testifyproject.testifyprojectmand
* @since {@link RemoteApiVersion#VERSION_1_17}
*/
RenameContainerCmd renameContainerCmd(@Nonnull String containerId);
RestartContainerCmd restartContainerCmd(@Nonnull String containerId);
CommitCmd org.testifyproject.testifyprojectmitCmd(@Nonnull String containerId);
BuildImageCmd buildImageCmd();
BuildImageCmd buildImageCmd(File dockerFileOrFolder);
BuildImageCmd buildImageCmd(InputStream tarInputStream);
TopContainerCmd topContainerCmd(String containerId);
TagImageCmd tagImageCmd(String imageId, String repository, String tag);
PauseContainerCmd pauseContainerCmd(String containerId);
UnpauseContainerCmd unpauseContainerCmd(String containerId);
EventsCmd eventsCmd();
StatsCmd statsCmd(String containerId);
CreateVolumeCmd createVolumeCmd();
InspectVolumeCmd inspectVolumeCmd(String name);
RemoveVolumeCmd removeVolumeCmd(String name);
ListVolumesCmd listVolumesCmd();
ListNetworksCmd listNetworksCmd();
InspectNetworkCmd inspectNetworkCmd();
CreateNetworkCmd createNetworkCmd();
RemoveNetworkCmd removeNetworkCmd(@Nonnull String networkId);
ConnectToNetworkCmd connectToNetworkCmd();
DisconnectFromNetworkCmd disconnectFromNetworkCmd();
@Override
void close() throws IOException;
}