def _build_tag_opts(tags):
    """
    create a list of tag options suitable for consumption by
    subprocess.check_output and similar functions.

    >>> _build_tag_opts(['v1.2.3', 'latest'])
    ['-t', 'v1.2.3', '-t', 'latest']

    :param tags: sequence of tag strings
    :returns: list of tag arguments to be fed to docker build.
    """
    tag_opts = []
    for tag in tags:
        tag_opts += ['-t'] + [tag]

    return tag_opts