Package io.ebean.docker.commands
Class Commands
- java.lang.Object
-
- io.ebean.docker.commands.Commands
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisRegistered(String containerName)Return true if the container is registered (exists and maybe running or not).booleanisRunning(String containerName)Return true if the container is running.List<String>logs(String containerName)Return true if the logs of the container contain the match text.List<String>logs(String containerName, int tail)Return the logs for the container with a tail.booleanlogsContain(String containerName, String match)Return true if the logs of the container contain the match text.booleanlogsContain(String containerName, String logMessage, int tail)Return true if the container logs contains the logMessage.booleanlogsContain(String containerName, String match, String clearMatch)List<String>logsWithMatch(String containerName, String match, String clearMatch)Return true if the logs of the container contain the match text.StringregisteredPortMatch(String containerName, int matchPort)Check if the port matches the existing port bindings and if not return the existing port bindings.voidremove(String containerName)Remove the container.voidremoveContainers(String... containerNames)voidstart(String containerName)Start the container.voidstop(String containerName)Stop the container.voidstopContainers(String... containerNames)voidstopIfRunning(String containerName)Stop the container checking to see if it is running first.voidstopRemove(String containerName)Stop and remove the container.
-
-
-
Method Detail
-
stopIfRunning
public void stopIfRunning(String containerName)
Stop the container checking to see if it is running first.
-
stopRemove
public void stopRemove(String containerName)
Stop and remove the container.
-
removeContainers
public void removeContainers(String... containerNames)
-
stopContainers
public void stopContainers(String... containerNames)
-
isRegistered
public boolean isRegistered(String containerName)
Return true if the container is registered (exists and maybe running or not).
-
logsContain
public boolean logsContain(String containerName, String match)
Return true if the logs of the container contain the match text.
-
logsContain
public boolean logsContain(String containerName, String match, String clearMatch)
-
logsWithMatch
public List<String> logsWithMatch(String containerName, String match, String clearMatch)
Return true if the logs of the container contain the match text.
-
logs
public List<String> logs(String containerName)
Return true if the logs of the container contain the match text.
-
registeredPortMatch
public String registeredPortMatch(String containerName, int matchPort)
Check if the port matches the existing port bindings and if not return the existing port bindings.
-
logsContain
public boolean logsContain(String containerName, String logMessage, int tail)
Return true if the container logs contains the logMessage.Usually used to find a log entry to indicate the container is ready for use.
- Parameters:
containerName- The container logs to searchlogMessage- The logMessage we are looking for (to usually indicate the container is ready).tail- The number of logs to tail (such that we get recent and minimal logs)- Returns:
- True if the logs searched contain the logMessage
-
-