docker volume create --name nexus-data
docker run -d -p 8899:8081 --name nexus --restart=always -v nexus-data:/nexus-data --net=host sonatype/nexus3
看图可以看到容器启动正常
执行上面创建容器的过程, 宿主机的8899端口都没有监听,无法访问8899端口, 去掉--net=host ,以容器的默认网络, 是可以正常访问的
查看docker启动日记: docker logs -f f3c507b2c3bd
可以看到容器内已经监听8081端口了
查看宿主机的网络监听
没有看到监听到8081和8899
有哪位大佬遇到此问题, 求解答