0
点赞
收藏
分享

微信扫一扫

docker启动nexus启动失败Unable to update instance pid: Unable to create directory /nexus-data/instances

1.容器搭建nexus如下

docker run -d -p 8081:8081 --name nexus --restart=always -v /usr/local/nexus/:/nexus-data --privileged=true  sonatype/nexus3

然后发现容器一直自动重启,没办法一直正常有运行,docker logs 查看容器日志提示如下

Error creating bundle cache.

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

docker启动nexus启动失败Unable to update instance pid: Unable to create directory /nexus-data/instances_docker

大概权限是没有创建文件权限的意思

解决办法:

cd /usr/local/

chmod 777 nexus

容器自动运行正常

挂载的nexus目录内容如下

docker启动nexus启动失败Unable to update instance pid: Unable to create directory /nexus-data/instances_maven_02


举报

相关推荐

0 条评论