import six


def _convert_profile_to_docker_envs(profile):
    """Convert a profile object to Docker environment variables

    Parameters
    ----------
    profile: namedtuple

    Returns
    -------
    dict of environemnt variables to be used by docker-py
    """
    profile = profile._asdict()
    return dict([(key.upper(), value) for key, value in six.iteritems(profile)])