问题1:启动nexus时,没有权限操作宿主机文件夹
docker run -d -p 8082:8082 -v /home/nexus-data/:/nexus-data/ --name nexus1 sonatype/nexus3
Warning: Cannot open log file: ../sonatype-work/nexus3/log/jvm.log
Warning: Forcing option -XX:LogFile=/tmp/jvm.log
Unable to update instance pid: Unable to create directory /nexus-data/instances
/nexus-data/log/karaf.log (No such file or directory)
Unable to update instance pid: Unable to create directory /nexus-data/instances
mkdir: cannot create directory '../sonatype-work/nexus3/log': Permission denied
mkdir: cannot create directory '../sonatype-work/nexus3/tmp': Permission denied
OpenJDK 64-Bit Server VM warning: Cannot open file ../sonatype-work/nexus3/log/jvm.log due to No such file or directory
解决方案: 修改宿主机文件夹权限
chmod 777 /home/nexus-data1
问题2:设置端口8082,拒绝访问
解决方案:修改nexus配置文件 nexus.properties
application-port=8082 #修改成自己想要的端口
本文由 创作,采用 知识共享署名4.0 国际许可协议进行许可。本站文章除注明转载/出处外,均为本站原创或翻译,转载前请务必署名。最后编辑时间为: 2020/05/16 03:19