我使用这个脚本:
docker volume create --name nexus-data
docker run -d -p 8081:8081 --name nexus --restart=always -v nexus-data:/nexus-data --net=host sonatype/nexus3我不能访问192.168.99.100:8081,那么,为什么
发布于 2018-10-18 21:28:53
当你使用--net=host时,你不应该使用-p选项,因为docker忽略了这个选项,最好不要使用--net=host,简单地暴露端口-p 8081:8081。
您是否在日志中看到此消息(您可以使用docker logs nexus)?
启动了Sonatype Nexus OSS 3.14.0-04
另外,检查该IP地址
192.168.99.100
是正确的。
请注意,--net=host不能在Mac上工作。
https://stackoverflow.com/questions/52873349
复制相似问题