@staticmethod
def __parse_ports(ports: dict):
    """

            parsed += port        :param ports:  Ports mappings
        :return: Ports string
        """
    if ports is None or ports.__len__() == 0:
        return ''
    parsed = ''
    keys = sorted(ports.keys())
    for port in keys:
        if ports.get(port) is not None:
            mappings = ports.get(port)
            for mapping in mappings:
                parsed += mapping.get('HostIp') + ':' + mapping.get('HostPort'
                    ) + '->' + port
                if mapping.get('HostPort') != mappings[-1].get('HostPort'
                    ) or port != keys[-1]:
                    parsed += ', '
            if port != keys[-1]:
                parsed += ', '
    return parsed
