Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nexus仓库 #52

Open
xuanyuanaosheng opened this issue Nov 26, 2024 · 3 comments
Open

Nexus仓库 #52

xuanyuanaosheng opened this issue Nov 26, 2024 · 3 comments

Comments

@xuanyuanaosheng
Copy link
Owner

xuanyuanaosheng commented Nov 26, 2024

公司文件仓库

国内的IT基础设施环境很差,因为国家某些原因,基本上国外提供的优质源很难访问,包括但不限于Docker, Python pip, Github等等,政府只管封,根本不会提供对应的镜像服务,导致对于比较大的IT公司不得不花费很大的时间自建各种源。

对于公司级别的文档仓库,使用的方案有很多

文件系统

  • Linux下的sftp
  • Windows系统的ADFS
  • Linux下的NFS

私有网盘

仓库管理

  • Nexus

Nexus自建Raw作为共有文件仓库,其上传和下载提供了web和API进行处理。

上传
image

### 通过API上传

curl -v -u 'xxx:xxx' -X POST \
https://repository.bruce.me/service/rest/v1/components?repository=raw \
-F raw.directory=packages \
-F [email protected]_203.tar.gz \
-F raw.asset1.filename=jdk1.8.0_203.tar.gz

-----------------------------------------------------
raw.directory  表示存在于什么目录
raw.asset1  指定本地文件,需要带上 @
raw.asset1.filename  在服务器上仓库内保存的文件名,建立与原文件名一致
可同时上传多个文件,将第二个文件的参数更改为 asset2 即可,第三个文件的参数调整为 asset3,依次类推。但只能在同一目录。

### 下载直接可以在web页面右键找到其下载地址或者直接访问链接,拼接: 域名/repository/仓库名称/目录/文件名

参考资料

@xuanyuanaosheng
Copy link
Owner Author

Nexus配置Docker镜像代理

Image

Image

Image

Image

Image

@xuanyuanaosheng
Copy link
Owner Author

Nexus配置Helm Charts代理

(PS: 当前Nexus不支持配置oci协议的Helm Charts代理)

下面以: https://prometheus-community.github.io 的 Helm Charts为例

Image

Image

Image

下面再以 uptime-kuma的helm Charts为例:https://helm.irsigler.cloud

Image

Image

Image

参考资料

@xuanyuanaosheng
Copy link
Owner Author

Nexus配置操作系统Repo源代理

Image

Image

Image

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant