Docker构建Maven私服

1.下载镜像

[root@master_150 ~]# docker pull sonatype/nexus3

2.运行容器

[root@master_150 ~]# docker run -d -p 8081:8081 --name nexus -v /opt/nexus/nexus-data:/var/nexus-data --restart=always 192.168.1.196:5000/sonatype/nexus3:latest

3.登录后台

admin/admin123

4.创建仓库

点击Create repository

然后选择maven2(hosted)

然后输入仓库名称(test-release)

在version policy中选择这个仓库的类型,这里选择release

在Deployment policy中选择Allow redeploy

5.创建用户

点击左侧菜单栏的Users菜单,然后点击Create local user

欢迎各位大神评论点赞!

发布了28 篇原创文章 · 获赞 36 · 访问量 739

猜你喜欢

转载自blog.csdn.net/xieweikun_7/article/details/105334330