架构师_程序员_码农网

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

搜索
查看: 70|回复: 2

【Nexus3】(一)使用 Docker 安装部署 Nexus 教程

[复制链接]
发表于 前天 14:43 | 显示全部楼层 |阅读模式
需求:网上其实有很多关于 Docker 部署 Nexus 3 的教程,但是 Nexus3 在部署过程中需要进行调优,关闭一些不必要的配置功能。例如:遥感分析、包漏洞检查、恶意软件警告等功能(部分功能都需要连网,为了防止隐私泄露,建议关闭)。很多存储库功能比较单一,有的只能做 nuget 包,有的只能做 npm 包,有的只能做 docker 镜像,每个都搭建的话,非常费事,维护起来也比较麻烦。

回顾:
【实战】使用 ProGet 搭建 NuGet 私有仓库
https://www.itsvse.com/thread-10263-1-1.html

Nexus

官网:https://www.sonatype.com/
下载:https://help.sonatype.com/en/download-archives---repository-manager-3.html
社区版源码:https://github.com/sonatype/nexus-public

Nexus Repository 3.70.x Downloads with OrientDB 和  Download Archives - Repository Manager 3 区别是什么?

Sonatype Nexus Repository 社区版是帮助个人开发者和小型团队有效管理组件的完美解决方案——而且完全免费!作为我们原有 Sonatype Nexus Repository OSS 的下一代演进,社区版为您提供了旨在满足当今快速发展的开发团队需求的现代化功能。

社区版限制

Sonatype Nexus Repository 社区版旨在为个人用户和小型团队提供强大的存储库管理。它支持最多100,000 个组件和每天 200,000 个请求。

对于少数规模较大或使用率较高的团队,如果超出这些限制,社区版的内置安全措施将暂停添加新组件,直到使用率恢复到两个阈值以下。这使得我们的免费社区版与团队和小型组织保持一致,并确保大型企业通过专业版获得可靠运行关键任务系统所需的支持和企业级功能。

功能比较

QQ截图20250528142014.jpg QQ截图20250528142023.jpg QQ截图20250528142034.jpg

参考:https://help.sonatype.com/en/nexus-repository-feature-matrix.html

存储库格式

从3.x开始,它默认支持许多主流的软件包格式:

  • Bower
  • Docker
  • Git LFS
  • Maven
  • npm
  • NuGet
  • PyPI
  • Ruby
  • Gems
  • Yum
  • Proxy


QQ截图20250528142153.jpg

参考:https://help.sonatype.com/en/formats.html

Docker 部署

首先,创建数据文件夹并设置正确的权限(否则启动会报错),命令如下:

docker-compose.yml 配置如下:

启动命令如下:

稍等一会,默认密码请查看:cat [映射主机目录]/admin.password,然后,通过浏览器登录如下:

QQ截图20250528143639.jpg QQ截图20250528143733.jpg

关闭 Outreach: Management

步骤:System -> Capabilities -> Outreach: Management -> Disabled

QQ截图20250528144007.jpg

如果不进行调优操作,运行过程中,可能会报错如下:
2025-05-16 09:59:15,100+0800 INFO  [pool-2-thread-1] anonymous org.apache.http.impl.execchain.RetryExec - I/O exception (java.net.SocketException) caught when processing request to {s}->https://sonatype-download.global.ssl.fastly.net:443: Network is unreachable
2025-05-16 09:59:15,100+0800 INFO  [pool-2-thread-1] anonymous org.apache.http.impl.execchain.RetryExec - Retrying request to {s}->https://sonatype-download.global.ssl.fastly.net:443
2025-05-16 09:59:35,120+0800 INFO  [pool-2-thread-1] anonymous org.apache.http.impl.execchain.RetryExec - I/O exception (java.net.SocketException) caught when processing request to {s}->https://sonatype-download.global.ssl.fastly.net:443: Network is unreachable
2025-05-16 09:59:35,120+0800 INFO  [pool-2-thread-1] anonymous org.apache.http.impl.execchain.RetryExec - Retrying request to {s}->https://sonatype-download.global.ssl.fastly.net:443
2025-05-16 09:59:55,139+0800 WARN  [pool-2-thread-1] anonymous com.sonatype.nexus.plugins.outreach.internal.outreach.SonatypeOutreach - Could not download page bundle



2025-05-28 10:41:05,758+0800 WARN  [pool-2-thread-1] anonymous com.sonatype.nexus.plugins.outreach.internal.outreach.SonatypeOutreach - Could not download page bundle
org.apache.http.conn.ConnectTimeoutException: Connect to links.sonatype.com:443 [links.sonatype.com/3.130.138.154, links.sonatype.com/3.13.154.138, links.sonatype.com/18.224.75.160] failed: Connect timed out
        at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:151)
        at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:376)
        at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:393)
        at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
        at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186)

参考:https://github.com/sonatype/nexus-public/issues/518




上一篇:【Playwright】(二)常用功能和操作
码农网,只发表在实践过程中,遇到的技术难题,不误导他人。
 楼主| 发表于 前天 15:42 | 显示全部楼层
You must accept the End User License Agreement (EULA) through the onboarding wizard or REST API before proceeding. See https://links.sonatype.com/products/nxrm3/docs/ce-onboarding for details.

解决方案


参考:https://help.sonatype.com/en/ce-onboarding.html

码农网,只发表在实践过程中,遇到的技术难题,不误导他人。
 楼主| 发表于 前天 16:26 | 显示全部楼层
应该删除如下配置,否则一些提示看不到。
码农网,只发表在实践过程中,遇到的技术难题,不误导他人。
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则

免责声明:
码农网所发布的一切软件、编程资料或者文章仅限用于学习和研究目的;不得将上述内容用于商业或者非法用途,否则,一切后果请用户自负。本站信息来自网络,版权争议与本站无关。您必须在下载后的24个小时之内,从您的电脑中彻底删除上述内容。如果您喜欢该程序,请支持正版软件,购买注册,得到更好的正版服务。如有侵权请邮件与我们联系处理。

Mail To:help@itsvse.com

QQ|手机版|小黑屋|架构师 ( 鲁ICP备14021824号-2 )|网站地图

GMT+8, 2025-5-30 16:46

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表