Docker Community Forums

Share and learn in the Docker community.

Host discovery using Nmap on Docker with odd results

Hi!
I don’t know if this is the right place to ask but I’ve been trying to perform some host-discovery on my home network and I don’y know if Docker isn’t able to perform this well or some network configuration is needed.
If I try to execute this docker run --rm uzyexe/nmap -v -sn 192.168.1.* (I’m using this image for simplicity, I tried installing Nmap on another container to no avail) it reports all hosts as up:

Initiating Ping Scan at 19:02                                           
Scanning 256 hosts [4 ports/host]                                       
Completed Ping Scan at 19:03, 9.25s elapsed (256 total hosts)           
Initiating Parallel DNS resolution of 256 hosts. at 19:03               
Completed Parallel DNS resolution of 256 hosts. at 19:03, 14.74s elapsed
Nmap scan report for 192.168.1.0                                                                                
Host is up (0.0048s latency).                                           
Nmap scan report for 192.168.1.1                                        
Host is up (0.0030s latency).                                           
Nmap scan report for 192.168.1.2                                        
Host is up (0.0028s latency).                                           
Nmap scan report for 192.168.1.3                                        
Host is up (0.0038s latency).                                           
Nmap scan report for 192.168.1.4                                        
Host is up (0.0038s latency).                                           
Nmap scan report for 192.168.1.5                                        
Host is up (0.0038s latency).                                           
Nmap scan report for 192.168.1.6                                        
Host is up (0.0018s latency).                                           
Nmap scan report for 192.168.1.7                                        
Host is up (0.0018s latency).                                           
Nmap scan report for 192.168.1.8                                        
Host is up (0.0018s latency).                                           
Nmap scan report for 192.168.1.9       
(snip)     
Read data files from: /usr/bin/../share/nmap
Nmap done: 256 IP addresses (256 hosts up) scanned in 24.03 seconds
           Raw packets sent: 1656 (62.028KB) | Rcvd: 259 (10.228KB)                            

When it’s clearly not. I have also tested with a Virtualbox VM on a bridge network adapter and it reports the correct number of hosts in my network. The other functionalities of Nmap work well but I’d like to know how to perform the host-discovery part.
If I assume correctly this container is running on a bridge driver and it can certainly scan the hosts in my network so I don’t really know what’s happening.