'Extract host bindings, if any, from list of volume mapping strings.
:return: dictionary of bind mappings'

@staticmethod
def _get_volume_binds(volumes):

    result = dict()
    if volumes:
        for vol in volumes:
            host = None
            if (':' in vol):
                if (len(vol.split(':')) == 3):
                    (host, container, mode) = vol.split(':')
                if (len(vol.split(':')) == 2):
                    parts = vol.split(':')
                    if (parts[1] not in VOLUME_PERMISSIONS):
                        (host, container, mode) = (vol.split(':') + ['rw'])
            if (host is not None):
                result[host] = dict(bind=container, mode=mode)
    return result
