GITHUB地址
https://github.com/sonatype/docker-nexus3
docker hub地址
https://hub.docker.com/r/sonatype/nexus3
数据持久化部署
#创建卷
docker volume create --name nexus-data
#挂载卷,映射8081,启动Nexus
docker run -d -p 8081:8081 --name nexus -v nexus-data:/nexus-data sonatype/nexus3
测试:
docker ps | grep nexus
curl http://localhost:8081/
使用
查看密码
docker exec nexus cat /nexus-data/admin.password
登录UI
http://IP:8081
访客模式,只能看仓库一些信息,不能添加修改
管理员登录,用上面获取到的密码,点击右上角Sign IN输入账号
账号:admin
密码:$(docker exec nexus cat /nexus-data/admin.password)
修改密码
登录成功界面
添加一个仓库
根据实际需要选择,具体操作请看后续