基于Docker安装Nexus笔记

Docker仓库地址:https://hub.docker.com/r/sonatype/nexus/

安装报错

Exception in thread "main" java.lang.IllegalStateException: Nexus work directory already in use: /sonatype-work
at com.google.common.base.Preconditions.checkState(Preconditions.java:200)

解决方法:

  1. 进入容器中查看用户和组
docker run -it --rm sonatype/nexus bash

显示内容大概如下:

uid=200(nexus) gid=200(nexus) groups=200(nexus)
  1. 退出容器exit
  2. 对目录进行授权
sudo chown -R 200:200 /opt/nexus

https://stackoverflow.com/questions/36405434/sonatype-nexus-docker-volume-error

你可能感兴趣的:(基于Docker安装Nexus笔记)