当前位置: 首页 > news >正文

【DevOps】基于Nexus3部署Docker内网私有代理仓库docker proxy

nexus3权限配置

请参照上面的流程图,按照以下步骤进行检查:

  1. 确认 Docker Bearer Token Realm 已激活

    • 路径:Nexus 控制台 → SecurityRealms
    • 检查:确保 Docker Bearer Token Realm 出现在右侧的 Active 栏中。这是实现Docker仓库认证的关键安全模块,即使勾选了“Allow anonymous docker pull”,如果此项未激活,匿名访问也会失败
  2. 检查匿名用户访问权限

    • 路径:Nexus 控制台 → SecurityAnonymous Access
    • 检查:确保选择了 Allow anonymous users to access the server。这样,未登录的客户端才被允许与仓库交互。
  3. 特别注意Podman客户端的差异

    • 你已经在使用 --tls-verify=false 来绕过HTTPS验证,这是正确的。因为Nexus仓库默认使用HTTP,而Podman对安全性的要求可能比Docker更严格。

创建docker(proxy)仓库

Name: docker-proxy

Repository Connectors:

HTTP: 8090

​ 勾选:Allow anonymous docker pull ( Docker Bearer Token Realm required )

​ 勾选:Allow clients to use the V1 API to interact with this repository

Proxy

​ Remote Storage:https://docker.1ms.run

​ Docker Index: Use proxy registry(specified above)

客户端使用(HTTP协议)

podman客户端

[root@10-2-0-4 ~]# podman pull --tls-verify=false 10.2.0.100:8090/library/nginx:latest
Trying to pull 10.2.0.100:8090/library/nginx:latest...
Getting image source signatures
Copying blob 8da8ed3552af done
Copying blob b459da543435 done
Copying blob 5d8ea9f4c626 done
Copying blob 58d144c4badd done
Copying blob 54e822d8ee0c done
Copying blob 250b90fb2b9a done
Copying blob 8c7716127147 done
Copying config 07ccdb7838 done
Writing manifest to image destination
Storing signatures
07ccdb7838758e758a4d52a9761636c385125a327355c0c94a6acff9babff938

Docker客户端

配置/etc/docker/daemon.json

参考以下registry-mirrors、insecure-registries两项配置。

{"exec-opts": ["native.cgroupdriver=systemd"],"registry-mirrors": ["http://10.2.0.100:8090"],"insecure-registries": ["http://10.2.0.100:8090"],"max-concurrent-downloads": 10,"log-driver": "json-file","log-level": "warn","log-opts": {"max-size": "10m","max-file": "3"},"data-root": "/var/lib/docker"
}

重启

 systemctl restart docker

查看dockerinfo

[root@10-2-0-4 ~]# docker info
Containers: 0Running: 0Paused: 0Stopped: 0
Images: 1
Server Version: 18.09.0
Storage Driver: overlay2Backing Filesystem: extfsSupports d_type: trueNative Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: systemd
Hugetlb Pagesize: 2MB, 2MB (default is 2MB)
Plugins:Volume: localNetwork: bridge host macvlan null overlayLog: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 871075eb7cc979944ba2d987719cb534bbb87e5c
runc version: N/A
init version: N/A (expected: )
Security Options:seccompProfile: default
Kernel Version: 5.10.0-216.0.0.115.oe2203sp4.x86_64
Operating System: openEuler 22.03 (LTS-SP4)
OSType: linux
Architecture: x86_64
CPUs: 20
Total Memory: 14.8GiB
Name: 10-2-0-4
ID: 4DKE:4SMB:KYOE:DA4F:7QCU:CBK5:FL7D:WJFC:BIIA:EVBG:ZGI2:GQWR
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:10.2.0.100:8090127.0.0.0/8
Registry Mirrors:http://10.2.0.100:8090/
Live Restore Enabled: true

拉取镜像


[root@10-2-0-4 ~]# docker pull nginx
Using default tag: latest
latest: Pulling from library/nginx
8c7716127147: Pull complete
250b90fb2b9a: Pull complete
5d8ea9f4c626: Pull complete
58d144c4badd: Pull complete
b459da543435: Pull complete
8da8ed3552af: Pull complete
54e822d8ee0c: Pull complete
Digest: sha256:3b7732505933ca591ce4a6d860cb713ad96a3176b82f7979a8dfa9973486a0d6
Status: Downloaded newer image for nginx:latest
http://www.dtcms.com/a/494527.html

相关文章:

  • [嵌入式系统-134]:智能体以及其嵌入式硬件架构
  • 不止于“看”:视频汇聚平台EasyCVR视频监控系统功能特点详解
  • R-切割数据
  • 探秘蚂蚁 S21 XP Immersion 300T:液冷技术如何提升挖矿效能
  • Steps + Input.TextArea 实现弹窗内容
  • 重庆装修公司排名表杭州网站建设优化
  • HarmonyOS应用开发指南:Toast无法显示的完整排查流程与实战案例
  • 【研究生随笔】Pytorch中的线性代数
  • 小米开源端到端语音模型 MiMo-Audio-7B-Instruct 语音智能与音频理解达 SOTA
  • 深度学习进阶(六)——世界模型与具身智能:AI的下一次跃迁
  • RV1106+es8388音频采集和播放调试
  • 【图像超分】论文复现:轻量化超分 | FMEN的Pytorch源码复现,跑通源码,整合到EDSR-PyTorch中进行训练、重参数化、测试
  • 网站设计的公司排名无极电影网首页
  • vue3引入海康监控视频组件并实现非分屏需求一个页面同时预览多个监控视频(3)-接口分页篇(最终版)
  • 新华三H3CNE网络工程师认证—OSPF多区域概念与配置
  • 软件开发商网站html网站用什么空间
  • 免费炫酷网站模板wordpress 模板 破解版
  • Linux1017 shell:awk print printf
  • 服务器对网站的作用有哪些?
  • linux系统编程(十③)RK3568 socket之 TCP 服务器的实现
  • 29、构建可视化日志管理服务器
  • 代码解析:《AGENTREVIEW: Exploring Peer Review Dynamics with LLM Agents》
  • 嵌入式软件面试
  • 安卓前后端连接教程
  • linux系统编程(十③)RK3568 socket之 TCP 服务器的实现【更新客户端断开重连依旧可以收发】
  • Windows系统错误6118全面解决方案:修复此工作组的服务器列表当前无法使用
  • 衡阳网站页面设计公司昆明抖音代运营
  • 昆明网站建设是什么意思WordPress添加PHP代码
  • 前端基础——HTML练习项目:填写简历信息
  • Python实现的服务器日志监控脚本