def tmpfs_list_to_dict(tmpfs_list):
    """Transform list of tmpfs parameters to dictionary

    :param tmpfs_list: List of tmpfs entry (of form 'directory:options')
    :returns: Dictionary as needed by Docker API
    """
    d = dict()
    for i in tmpfs_list:
        tmpfs_spec = i.split(':', 1)
        if len(tmpfs_spec) == 1:
            d[tmpfs_spec[0]] = ''
        else:
            d[tmpfs_spec[0]] = tmpfs_spec[1]
    return d
