public class DockerApi.ContainerApi
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
ContainerReference |
create(ContainerConfig config,
ContainerContent... contents)
Create a new container a
ContainerConfig. |
void |
logs(ContainerReference reference,
UpdateListener<LogUpdateEvent> listener)
Return and follow logs for a specific container.
|
void |
remove(ContainerReference reference,
boolean force)
Remove a specific container.
|
void |
start(ContainerReference reference)
Start a specific container.
|
ContainerStatus |
wait(ContainerReference reference)
Wait for a container to stop and retrieve the status.
|
public ContainerReference create(ContainerConfig config, ContainerContent... contents) throws java.io.IOException
ContainerConfig.config - the container configcontents - additional contents to includeContainerReference for the newly created containerjava.io.IOException - on IO errorpublic void start(ContainerReference reference) throws java.io.IOException
reference - the container reference to startjava.io.IOException - on IO errorpublic void logs(ContainerReference reference, UpdateListener<LogUpdateEvent> listener) throws java.io.IOException
reference - the container referencelistener - a listener to receive log update eventsjava.io.IOException - on IO errorpublic ContainerStatus wait(ContainerReference reference) throws java.io.IOException
reference - the container referenceContainerStatus indicating the exit status of the containerjava.io.IOException - on IO errorpublic void remove(ContainerReference reference, boolean force) throws java.io.IOException
reference - the container to removeforce - if removal should be forcedjava.io.IOException - on IO error