版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u013939884/article/details/88071661
问题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 #修改成自己想要的端口