public interface DockerClient extends Closeable
AuthConfig authConfig() throws DockerException
DockerException
AuthCmd authCmd()
InfoCmd infoCmd()
PingCmd pingCmd()
VersionCmd versionCmd()
PullImageCmd pullImageCmd(@Nonnull String repository)
PushImageCmd pushImageCmd(@Nonnull String name)
PushImageCmd pushImageCmd(@Nonnull Identifier identifier)
CreateImageCmd createImageCmd(@Nonnull String repository, @Nonnull InputStream imageStream)
LoadImageCmd loadImageCmd(@Nonnull InputStream imageStream)
imageStream
- stream of the tarball fileRemoteApiVersion#VERSION_1_7
LoadImageAsyncCmd loadImageAsyncCmd(@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)
name
- The name, e.g. "alexec/busybox" or just "busybox" if you want to default. Not null.SaveImagesCmd saveImagesCmd()
ListContainersCmd listContainersCmd()
CreateContainerCmd createContainerCmd(@Nonnull String image)
StartContainerCmd startContainerCmd(@Nonnull String containerId)
StartContainerCmd
for the container with the given ID. The command can then be further customized by using
builder methods on it like StartContainerCmd#withDns(String...)
.
If you customize the command, any existing configuration of the target container will get reset to its default before applying the
new configuration. To preserve the existing configuration, use an unconfigured StartContainerCmd
.
This command corresponds to the /containers/{id}/start
endpoint of the Docker Remote API.
ExecCreateCmd execCreateCmd(@Nonnull String containerId)
ResizeExecCmd resizeExecCmd(@Nonnull String execId)
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)
CopyArchiveFromContainerCmd copyArchiveFromContainerCmd(@Nonnull String containerId, @Nonnull String resource)
containerId
- id of the containerresource
- path to container's resourceRemoteApiVersion#VERSION_1_20
@Deprecated CopyFileFromContainerCmd copyFileFromContainerCmd(@Nonnull String containerId, @Nonnull String resource)
copyArchiveFromContainerCmd(String, String)
since 1.24 fails.containerId
- id of the containerresource
- path to container's resourcecopyArchiveFromContainerCmd(String, String)
CopyArchiveToContainerCmd copyArchiveToContainerCmd(@Nonnull String containerId)
containerId
- id of the containerRemoteApiVersion#VERSION_1_20
ContainerDiffCmd containerDiffCmd(@Nonnull String containerId)
StopContainerCmd stopContainerCmd(@Nonnull String containerId)
KillContainerCmd killContainerCmd(@Nonnull String containerId)
UpdateContainerCmd updateContainerCmd(@Nonnull String containerId)
containerId
- id of the containerRemoteApiVersion#VERSION_1_22
RenameContainerCmd renameContainerCmd(@Nonnull String containerId)
containerId
- id of the containerRemoteApiVersion#VERSION_1_17
RestartContainerCmd restartContainerCmd(@Nonnull String containerId)
ResizeContainerCmd resizeContainerCmd(@Nonnull String containerId)
BuildImageCmd buildImageCmd()
BuildImageCmd buildImageCmd(File dockerFileOrFolder)
BuildImageCmd buildImageCmd(InputStream tarInputStream)
TopContainerCmd topContainerCmd(String containerId)
TagImageCmd tagImageCmd(String imageId, String imageNameWithRepository, String tag)
PauseContainerCmd pauseContainerCmd(String containerId)
UnpauseContainerCmd unpauseContainerCmd(String containerId)
EventsCmd eventsCmd()
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()
InitializeSwarmCmd initializeSwarmCmd(SwarmSpec swarmSpec)
swarmSpec
- the specification for the swarmInspectSwarmCmd inspectSwarmCmd()
JoinSwarmCmd joinSwarmCmd()
LeaveSwarmCmd leaveSwarmCmd()
UpdateSwarmCmd updateSwarmCmd(SwarmSpec swarmSpec)
swarmSpec
- the specification for the swarmUpdateSwarmNodeCmd updateSwarmNodeCmd()
RemoveSwarmNodeCmd removeSwarmNodeCmd(String swarmNodeId)
swarmNodeId
- swarmNodeIdListSwarmNodesCmd listSwarmNodesCmd()
ListServicesCmd listServicesCmd()
RemoteApiVersion#VERSION_1_24
CreateServiceCmd createServiceCmd(ServiceSpec serviceSpec)
serviceSpec
- the service specificationRemoteApiVersion#VERSION_1_24
InspectServiceCmd inspectServiceCmd(String serviceId)
serviceId
- service id or service nameUpdateServiceCmd updateServiceCmd(String serviceId, ServiceSpec serviceSpec)
serviceId
- service idserviceSpec
- the new service specificationRemoveServiceCmd removeServiceCmd(String serviceId)
serviceId
- service id or service nameListTasksCmd listTasksCmd()
LogSwarmObjectCmd logServiceCmd(String serviceId)
LogSwarmObjectCmd logTaskCmd(String taskId)
PruneCmd pruneCmd(PruneType pruneType)
RemoteApiVersion#VERSION_1_25
ListSecretsCmd listSecretsCmd()
RemoteApiVersion#VERSION_1_25
CreateSecretCmd createSecretCmd(SecretSpec secretSpec)
secretSpec
- the secret specificationRemoteApiVersion#VERSION_1_25
RemoveSecretCmd removeSecretCmd(String secretId)
secretId
- secret id or secret nameRemoteApiVersion#VERSION_1_25
ListConfigsCmd listConfigsCmd()
RemoteApiVersion#VERSION_1_30
CreateConfigCmd createConfigCmd()
RemoteApiVersion#VERSION_1_30
InspectConfigCmd inspectConfigCmd(String configId)
configId
- config id or config nameRemoteApiVersion#VERSION_1_30
RemoveConfigCmd removeConfigCmd(String configId)
configId
- config id or config nameRemoteApiVersion#VERSION_1_30
void close() throws IOException
close
in interface AutoCloseable
close
in interface Closeable
IOException
Copyright © 2023. All rights reserved.