Get mapping of TCP/IP ports
(self)
| 115 | return proot_vol_list |
| 116 | |
| 117 | def _get_network_map(self): |
| 118 | """Get mapping of TCP/IP ports""" |
| 119 | proot_netmap_list = [] |
| 120 | for (cont_port, host_port) in list(self._get_portsmap().items()): |
| 121 | proot_netmap_list.extend(["-p", "%d:%d" % (cont_port, host_port)]) |
| 122 | if self.opt["netcoop"] and self._has_option("--netcoop"): |
| 123 | proot_netmap_list.extend(["-n", ]) |
| 124 | if proot_netmap_list and self._has_option("--port"): |
| 125 | return proot_netmap_list |
| 126 | return [] |
| 127 | |
| 128 | def _get_qemu_string(self): |
| 129 | """Get the qemu string for container run command if emulation needed""" |