public interface ContainerApi
Modifier and Type | Method and Description |
---|---|
InputStream |
attach(String containerId) |
InputStream |
attach(String containerId,
AttachOptions options) |
Image |
commit()
Create a new image from a container’s changes
|
Image |
commit(CommitOptions options)
Create a new image from a container’s changes
|
InputStream |
copy(String containerId,
Resource resource) |
Container |
createContainer(String name,
Config config) |
Container |
inspectContainer(String containerId)
Return low-level information on the container id
|
void |
kill(String containerId) |
void |
kill(String containerId,
int signal) |
void |
kill(String containerId,
String signal) |
List<ContainerSummary> |
listContainers() |
List<ContainerSummary> |
listContainers(ListContainerOptions options) |
void |
pause(String containerId) |
void |
removeContainer(String containerId) |
void |
removeContainer(String containerId,
RemoveContainerOptions options) |
void |
restart(String containerId) |
void |
restart(String containerId,
int secondsToWait) |
void |
startContainer(String containerId) |
void |
startContainer(String containerId,
HostConfig hostConfig) |
void |
stopContainer(String containerId) |
void |
stopContainer(String containerId,
int secondsToWait) |
void |
unpause(String containerId) |
StatusCode |
wait(String containerId)
Block until container @param containerId stops, then returns the exit code
|
@Named(value="containers:list") List<ContainerSummary> listContainers()
@Named(value="containers:list") List<ContainerSummary> listContainers(ListContainerOptions options)
options
- the options to list the containers (@see ListContainerOptions)@Named(value="container:create") Container createContainer(String name, Config config)
name
- the name for the new container. Must match /?[a-zA-Z0-9_-]+.config
- the container’s configuration (@see BindToJsonPayload)@Named(value="container:inspect") Container inspectContainer(String containerId)
containerId
- The id of the container to get.null
if the container with the given id doesn't exist.@Named(value="container:delete") void removeContainer(String containerId)
containerId
- The id of the container to be removed.@Named(value="container:delete") void removeContainer(String containerId, RemoveContainerOptions options)
containerId
- The id of the container to be removed.options
- the operation’s configuration (@see RemoveContainerOptions)@Named(value="container:start") void startContainer(String containerId)
containerId
- The id of the container to be started.@Named(value="container:start") void startContainer(String containerId, HostConfig hostConfig)
containerId
- The id of the container to be started.hostConfig
- the container’s host configuration@Named(value="container:stop") void stopContainer(String containerId)
containerId
- The id of the container to be stopped.@Named(value="container:stop") void stopContainer(String containerId, int secondsToWait)
@Named(value="container:commit") Image commit()
@Named(value="container:commit") Image commit(CommitOptions options)
options
- the commit’s configuration (@see CommitOptions)@Named(value="container:pause") void pause(String containerId)
containerId
- The id of the container to be paused.@Named(value="container:unpause") void unpause(String containerId)
containerId
- The id of the container to be unpaused.@Named(value="container:attach") InputStream attach(String containerId)
containerId
- The id of the container to be attached.@Named(value="container:attach") InputStream attach(String containerId, AttachOptions options)
containerId
- The id of the container to be attached.options
- the attach options @see org.jclouds.docker.options.AttachOptions@Named(value="container:wait") StatusCode wait(String containerId)
@Named(value="container:restart") void restart(String containerId)
containerId
- restarts@Named(value="container:restart") void restart(String containerId, int secondsToWait)
@Named(value="container:kill") void kill(String containerId)
containerId
- to be killed@Named(value="container:kill") void kill(String containerId, int signal)
containerId
- to be killedsignal
- Signal to send to the container. When not set, SIGKILL is assumed and the call will waits for the
container to exit.@Named(value="container:kill") void kill(String containerId, String signal)
containerId
- to be killedsignal
- Signal string like "SIGINT" to send to the container. When not set, SIGKILL is assumed and the call will waits for
the container to exit.@Named(value="container:copy") InputStream copy(String containerId, Resource resource)
containerId
- id of the container to copy files fromCopyright © 2009-2016 The Apache Software Foundation. All Rights Reserved.