docker library

Helper for Docker cmdline operations.

Mainly thought as a helper-library for Grinder

@Task("Stops containers")
dockerStopp() {
    ["db-webappbase-test", "db-mobiad-test"].forEach((final String container) {
        log("Stopping container: $container");
        new Docker()..stop([container ],quiet: true);

@Task("Start container")
dockerStart() {
    new Docker()..start([ "db-webappbase-test" ],quiet: true);

@Task("Check if container runs and if container is available")
containerCheck() async {
    final Docker docker = new Docker();

    [ "db-mobiad-test"].forEach((final String name) => docker.stop([ name ]));
    docker.start([ containerNameToCheck] );

    final Container container = new Container(runningContainerIDs());
    if(!container.names.contains(containerNameToCheck)) {

        container.names.forEach((final String name) {
            log("Active containers: -${name}-");

        throw new ArgumentError("${containerNameToCheck} must be running for this test!");


Wrapper for Docker containers [...]
Synchronously runs the "docker" command. [...]
Arguments passed to See for more details.


allContainerIDs({Docker docker: const Docker() }) → UnmodifiableListView<String>
Returns all Docker-Container-IDs
runningContainerIDs({Docker docker: const Docker() }) → UnmodifiableListView<String>
Returns Docker-Container-IDs for active/running containers