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)
解决方法:
- 进入容器中查看用户和组
docker run -it --rm sonatype/nexus bash
显示内容大概如下:
uid=200(nexus) gid=200(nexus) groups=200(nexus)
- 退出容器
exit
- 对目录进行授权
sudo chown -R 200:200 /opt/nexus
https://stackoverflow.com/questions/36405434/sonatype-nexus-docker-volume-error