// Path: src/main/java/pl/domzal/junit/docker/rule/ex/InvalidVolumeFrom.java
// public class InvalidVolumeFrom extends IllegalStateException {
// 
//     public InvalidVolumeFrom(String message) {
//         super(message);
//     }
// 
// }
// 
// Path: src/main/java/pl/domzal/junit/docker/rule/wait/StartCondition.java
// public interface StartCondition {
//     /**
//      * Create {@link StartConditionCheck} instances for current {@link DockerRule}.
//      */
//     StartConditionCheck build(DockerRule currentRule);
// }


import java.io.File;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.spotify.docker.client.messages.HostConfig;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.tuple.Pair;
import org.junit.rules.RuleChain;
import com.spotify.docker.client.messages.PortBinding;
import pl.domzal.junit.docker.rule.ex.InvalidVolumeFrom;
import pl.domzal.junit.docker.rule.wait.StartCondition;
     * @deprecated Use {@link #stopOptions(StopOption...)} instead.
     */
    public DockerRuleBuilder keepContainer(boolean keepContainer) {
        if (keepContainer) {
            this.stopOptions.setOptions(StopOption.KEEP);
        } else {
            this.stopOptions.setOptions(StopOption.REMOVE);
        }
        return this;
    }

    /**
     * Force image pull even when image is already present.
     */
    public DockerRuleBuilder imageAlwaysPull(boolean alwaysPull) {
        this.imageAlwaysPull = alwaysPull;
        return this;
    }
    boolean imageAlwaysPull() {
        return imageAlwaysPull;
    }

    /**
     * Docker volume OR host directory to be mounted into container.<br/>
     * Please note that in case of host folder and boot2docker environments (OSX or Windows)
     * only locations inside $HOME can work (/Users or /c/Users respectively).<br/>
     * On Windows it is safer to use {@link #mountFrom(File)} instead.
     *
     * @param volumeOrPath Docker volume OR directory/file to be mounted (must be specified Unix style).
     */
// Path: src/main/java/pl/domzal/junit/docker/rule/ex/InvalidVolumeFrom.java
// public class InvalidVolumeFrom extends IllegalStateException {
// 
//     public InvalidVolumeFrom(String message) {
//         super(message);
//     }
// 
// }
// 
// Path: src/main/java/pl/domzal/junit/docker/rule/wait/StartCondition.java
// public interface StartCondition {
//     /**
//      * Create {@link StartConditionCheck} instances for current {@link DockerRule}.
//      */
//     StartConditionCheck build(DockerRule currentRule);
// }


// Path: src/main/java/pl/domzal/junit/docker/rule/DockerRuleBuilder.java
import java.io.File;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.spotify.docker.client.messages.HostConfig;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.tuple.Pair;
import org.junit.rules.RuleChain;
import com.spotify.docker.client.messages.PortBinding;
import pl.domzal.junit.docker.rule.ex.InvalidVolumeFrom;
import pl.domzal.junit.docker.rule.wait.StartCondition;

     * @deprecated Use {@link #stopOptions(StopOption...)} instead.
     */
    public DockerRuleBuilder keepContainer(boolean keepContainer) {
        if (keepContainer) {
            this.stopOptions.setOptions(StopOption.KEEP);
        } else {
            this.stopOptions.setOptions(StopOption.REMOVE);
        }
        return this;
    }

    /**
     * Force image pull even when image is already present.
     */
    public DockerRuleBuilder imageAlwaysPull(boolean alwaysPull) {
        this.imageAlwaysPull = alwaysPull;
        return this;
    }
    boolean imageAlwaysPull() {
        return imageAlwaysPull;
    }

    /**
     * Docker volume OR host directory to be mounted into container.<br/>
     * Please note that in case of host folder and boot2docker environments (OSX or Windows)
     * only locations inside $HOME can work (/Users or /c/Users respectively).<br/>
     * On Windows it is safer to use {@link #mountFrom(File)} instead.
     *
     * @param volumeOrPath Docker volume OR directory/file to be mounted (must be specified Unix style).
     */
    public DockerRuleMountToBuilder mountFrom(String volumeOrPath) throws InvalidVolumeFrom {