def expose_ports():
    """
    You specify exposed ports like this:
        EXPOSE external_port : docker_port
    """
    ports = []
    with open('.monobox') as monobox:
        for lines in monobox:
            if lines.partition(' ')[0] == 'EXPOSE':
                port_setting = lines.partition(' ')[2].rstrip()
                ports.append('-p')
                port_number = port_setting.partition(':')[0].rstrip()
                try:
                    internal_port_number = port_setting.partition(':')[3
                        ].rstrip()
                except IndexError:
                    internal_port_number = port_number
                ports.append(port_number + ':' + internal_port_number)
    return ports
