Ensure that a container is running. (`docker inspect`)

    containers
        name of the containers to start
    image
        name of the image to start the container from
    entrypoint
        Entrypoint of the container
    command
        command to execute while starting
    environment
        environment variable mapping ({'foo':'BAR'})
    ports
        List of ports definitions, either:
            - a port to map
            - a mapping of mapping portInHost : PortInContainer
    volumes
        List of volumes
    mem_limit:
        memory size limit
    cpu_shares:
        cpu shares authorized
    binds
        like -v of docker run command
    publish_all_ports
    links
        Link several container together
    port_bindings
        List of ports to expose on host system
            - a mapping port's guest, hostname's host and port's host.

    Returns
        Container Id

def running(config,
            containers,
            image,
            tag=None,
            entrypoint=None,
            command=None,
            environment=None,
            ports=None,
            volumes=None,
            mem_limit=0,
            cpu_shares=None,
            binds=None,
            publish_all_ports=False,
            links=None,
            port_bindings=None,
            force=True,
            hostname=None,
            *args, **kwargs):
    '''
    Ensure that a container is running. (`docker inspect`)

    containers
        name of the containers to start
    image
        name of the image to start the container from
    entrypoint
        Entrypoint of the container
    command
        command to execute while starting
    environment
        environment variable mapping ({'foo':'BAR'})
    ports
        List of ports definitions, either:
            - a port to map
            - a mapping of mapping portInHost : PortInContainer
    volumes
        List of volumes
    mem_limit:
        memory size limit
    cpu_shares:
        cpu shares authorized
    binds
        like -v of docker run command
    publish_all_ports
    links
        Link several container together
    port_bindings
        List of ports to expose on host system
            - a mapping port's guest, hostname's host and port's host.

    Returns
        Container Id
    '''
    if not containers:
        utils.warning("No container specified")
        return [], True

    if ports and port_bindings:
        (ports,port_bindings) = _gen_ports(ports,port_bindings,len(containers))
        if not ports or not port_bindings:
            utils.error("Unable to generate port bindings (is there enough space between each allocation required?)")
            return [], True

    containers_out = []
    failure = False

    if tag:
        image = "%s:%s"%(image,tag)

    for container in containers:
        port = (ports.pop() if ports else None)
        port_binding = (port_bindings.pop() if port_bindings else None)
        ret = installed(config,
                        container,image,entrypoint=entrypoint,command=command,environment=environment,ports=port,
                        volumes=volumes,mem_limit=mem_limit,cpu_shares=cpu_shares,force=force,hostname=hostname)
        if ret:
            started = start(config,
                container, binds=binds, port_bindings=port_binding,
                publish_all_ports=publish_all_ports, links=links)
            if is_running(config, container) and started:
                print "Container started, id: %s"%started.get("Id")
                containers_out.append(started)
            else:
                failure = True
                utils.error("Unable to run container: %s - can't start"%container)
        else:
            failure = True
            utils.error("Unable to run container: %s - can't install"%container)

    return containers_out, failure