import re


def arguments(body):
    """Takes a docker help body and parses its arguments.

    :param body: Body from `docker <command> --help`
    :type body: str
    :returns: Set of arguments
    :rtype: set
    """
    args = set()
    arg_pattern = re.compile(
        r'^((?:-\w+|--\w+(?:-?\w+)*)(?:=\S+)?)'
    )

    for line in body.splitlines():

        word_list = [i for i in line.split(' ') if i]
        for word in word_list:
            match = re.search(arg_pattern, word)
            if match is not None:
                args.add(match.group(1))

    return args