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

网站建设 启象科技公众号运营收费价格表

网站建设 启象科技,公众号运营收费价格表,易语言网站做软件下载,网店设计师是干什么的Docker安装部署Nexus3作为内网镜像代理 一、背景描述 基础镜像比较小,仓库使用阿里云或者腾讯云拉取速度挺快,但是时光飞逝几年时间过去,再加上AI加持的情况下,有些镜像的大小已经接近20G! 这种情况下不管是测试环境…

Docker安装部署Nexus3作为内网镜像代理

一、背景描述

基础镜像比较小,仓库使用阿里云或者腾讯云拉取速度挺快,但是时光飞逝几年时间过去,再加上AI加持的情况下,有些镜像的大小已经接近20G!
这种情况下不管是测试环境还是开发环境拉取镜像都会占用公司宽带流量,因此需要在测试环境搭建一台容器代理,用于缓存镜像!

二、搭建Nexus3作为镜像代理缓存阿里云、腾讯仓库私有镜像

2.1、Docker部署Nexus3

#数据持久化目录
mkdir -p /data/nexus3
#授权
chmod 777 -R /data/nexus3
#创建nexus3容器。
docker run -tid \--privileged=true\--network=host \--restart=always \-v /data/nexus3:/nexus-data \--name nexus3 \sonatype/nexus3#查看默认密码
cat /data/nexus3/admin.password 

2.2、登录nexus3并修改默认密码

修改默认密码,设置来宾用户访问
在这里插入图片描述
否则拉取镜像时会有如下报错:

[root@localhost certs.d]# crictl pull nginx
FATA[0002] pulling image failed: rpc error: code = NotFound desc = failed to pull and unpack image "docker.io/library/nginx:latest": failed to unpack image on snapshotter overlayfs: unexpected media type text/html for sha256:b6a78ff088000afc609fcbc701d18704ddb944e867af0dadd520d4bf0e5af328: not found 

三、配置Nexus3代理阿里云、腾讯云私有镜像仓库

3.0 备注

这里会创建三个代理
1、阿里云镜像加速
2、阿里云私有镜像仓库(内含公开镜像)
3、腾讯云私有镜像仓库
私有镜像仓库需要配置认证账号密码

3.1、创建Blob Store

在这里插入图片描述

3.2、创建阿里云私有镜像仓库代理

在这里插入图片描述
设置代理信息
在这里插入图片描述
勾选缓存镜像layer,选择创建的Blob store
在这里插入图片描述
因为使用的阿里云北京区的镜像仓库,所以这里填入北京区地址,如果是腾讯云仓库替换即可。
填入阿里云私有仓库认证账号密码
在这里插入图片描述
信息填完后点击Create repositories 完成创建。

3.3、重复3.2步骤创建好腾讯私有镜像仓库代理!

3.4、创建Docker-Group

选择docker(group类型)
在这里插入图片描述
红框需要设置或勾选信息
通过8888端口对外提供代理服务
在这里插入图片描述

把刚创建的docker代理加入到群组中
在这里插入图片描述

四、配置Containerd通过Nexus3镜像仓库下载镜像

4.0、Containerd 版本:

[root@localhost src]# ctr version
Client:Version:  v1.6.21Revision: 3dce8eb055cbb6872793272b4f20ed16117344f8Go version: go1.19.9Server:Version:  v1.6.21Revision: 3dce8eb055cbb6872793272b4f20ed16117344f8UUID: 01b66c6f-637c-4a15-a5db-fb0f75f1fe60

4.1、containerd默认配置

[root@localhost src]# cat /etc/containerd/config.toml 
version = 2
root = "/var/lib/containerd"
state = "/run/containerd"
oom_score = 0[grpc]address = "/run/containerd/containerd.sock"uid = 0gid = 0max_recv_message_size = 16777216max_send_message_size = 16777216[debug]address = "/run/containerd/containerd-debug.sock"uid = 0gid = 0level = "warn"[timeouts]"io.containerd.timeout.shim.cleanup" = "5s""io.containerd.timeout.shim.load" = "5s""io.containerd.timeout.shim.shutdown" = "3s""io.containerd.timeout.task.state" = "2s"[plugins][plugins."io.containerd.grpc.v1.cri"]sandbox_image = "sealos.hub:5000/pause:3.2"max_container_log_line_size = -1max_concurrent_downloads = 20disable_apparmor = true[plugins."io.containerd.grpc.v1.cri".containerd]snapshotter = "overlayfs"default_runtime_name = "runc"[plugins."io.containerd.grpc.v1.cri".containerd.runtimes][plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc]runtime_type = "io.containerd.runc.v2"runtime_engine = ""runtime_root = ""[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options]SystemdCgroup = true[plugins."io.containerd.grpc.v1.cri".registry]config_path = "/etc/containerd/certs.d"[plugins."io.containerd.grpc.v1.cri".registry.configs][plugins."io.containerd.grpc.v1.cri".registry.configs."sealos.hub:5000".auth]username = "admin"password = "passw0rd"

4.3、添加nexus3代理镜像

在config_path = “/etc/containerd/certs.d” 路径下创建需要经过nexus3的仓库文件夹

/etc/containerd/certs.d
[root@localhost certs.d]# ls -l
总用量 0
drwxr-xr-x 2 root root 24 9月   9 00:30 ccr.ccs.tencentyun.com
drwxr-xr-x 2 root root 24 9月   8 23:50 docker.io
drwxr-xr-x 2 root root 24 9月   8 23:50 registry.cn-beijing.aliyuncs.com
drwxr-xr-x 2 root root 24 9月   8 23:14 sealos.hub:5000
drwxr-xr-x 2 root root 24 9月   8 23:50 tf72mndn.mirror.aliyuncs.com
[root@localhost certs.d]# 

配置信息:

[root@localhost certs.d]# cat registry.cn-beijing.aliyuncs.com/hosts.toml 
server = "https://registry.cn-beijing.aliyuncs.com"[host."http://172.27.100.251:8888"]capabilities = ["pull", "resolve", "push"]skip_verify = true

4.4、重启Containerd并拉取镜像验证

[root@localhost certs.d]# systemctl restart containerd
[root@localhost certs.d]# crictl pull nginx

在这里插入图片描述
如上图所示,镜像已缓存!

五、Docker通过Nexus代理下载镜像

5.1、配置Nexus–Security–Realms

在这里插入图片描述

5.2、修改docker daemon.json配置

[root@localhost ~]# cat /etc/docker/daemon.json
{"insecure-registries": ["172.27.100.251:8888"],"registry-mirrors": ["http://172.27.100.251:8888"],"exec-opts": ["native.cgroupdriver=systemd"],"log-opts": {"max-file": "3","max-size": "500m"}
}

docker info

 Insecure Registries:172.27.100.251:8888127.0.0.0/8Registry Mirrors:http://172.27.100.251:8888/Live Restore Enabled: false

拉取镜像测试

参考:https://blog.csdn.net/qq_30051761/article/details/131139204


文章转载自:
http://flint.c7617.cn
http://swink.c7617.cn
http://denuclearise.c7617.cn
http://priapitis.c7617.cn
http://bustling.c7617.cn
http://secretion.c7617.cn
http://meter.c7617.cn
http://expectorate.c7617.cn
http://fulgid.c7617.cn
http://sideways.c7617.cn
http://underside.c7617.cn
http://dignity.c7617.cn
http://izzat.c7617.cn
http://thuggish.c7617.cn
http://cyberspace.c7617.cn
http://glede.c7617.cn
http://baleful.c7617.cn
http://carbonado.c7617.cn
http://compo.c7617.cn
http://chorogophic.c7617.cn
http://stagnate.c7617.cn
http://warcraft.c7617.cn
http://tourniquet.c7617.cn
http://alcaide.c7617.cn
http://spinigrade.c7617.cn
http://araneidan.c7617.cn
http://thecae.c7617.cn
http://lagos.c7617.cn
http://celbenin.c7617.cn
http://prestidigitation.c7617.cn
http://snowdon.c7617.cn
http://mouthbrooder.c7617.cn
http://perfoliate.c7617.cn
http://cadelle.c7617.cn
http://riksha.c7617.cn
http://carillon.c7617.cn
http://longawaited.c7617.cn
http://beijing.c7617.cn
http://krasnovodsk.c7617.cn
http://gerent.c7617.cn
http://adnascent.c7617.cn
http://manostat.c7617.cn
http://electrogasdynamics.c7617.cn
http://centromere.c7617.cn
http://conics.c7617.cn
http://botanic.c7617.cn
http://decasyllabic.c7617.cn
http://diphthongal.c7617.cn
http://ginnel.c7617.cn
http://realtor.c7617.cn
http://habitan.c7617.cn
http://balibuntal.c7617.cn
http://planetologist.c7617.cn
http://allpowerful.c7617.cn
http://forebay.c7617.cn
http://grifter.c7617.cn
http://despondently.c7617.cn
http://confusion.c7617.cn
http://semicontinuum.c7617.cn
http://lilylike.c7617.cn
http://ocellated.c7617.cn
http://potted.c7617.cn
http://vacuole.c7617.cn
http://culturist.c7617.cn
http://lactase.c7617.cn
http://orthoepist.c7617.cn
http://caramel.c7617.cn
http://motiveless.c7617.cn
http://woody.c7617.cn
http://rectory.c7617.cn
http://sensillum.c7617.cn
http://exorbitance.c7617.cn
http://tend.c7617.cn
http://foumart.c7617.cn
http://saurel.c7617.cn
http://radiodermatitis.c7617.cn
http://pietist.c7617.cn
http://mammilliform.c7617.cn
http://invalidation.c7617.cn
http://snowbrush.c7617.cn
http://histaminase.c7617.cn
http://peracid.c7617.cn
http://tennis.c7617.cn
http://chasid.c7617.cn
http://cinnamyl.c7617.cn
http://sandbar.c7617.cn
http://imperturbation.c7617.cn
http://annually.c7617.cn
http://clericalist.c7617.cn
http://occurent.c7617.cn
http://curler.c7617.cn
http://scorekeeper.c7617.cn
http://submaxillary.c7617.cn
http://parisienne.c7617.cn
http://polysorbate.c7617.cn
http://hemerocallis.c7617.cn
http://unpopular.c7617.cn
http://dish.c7617.cn
http://fossilist.c7617.cn
http://serological.c7617.cn
http://www.zhongyajixie.com/news/97189.html

相关文章:

  • 数码科技网站成品网站货源1
  • 优化是企业通过网站来做吗小红书信息流广告投放
  • ppt制作平台关键词优化多少钱
  • p2p网站如何做测试西安百度推广开户运营
  • 五个成功品牌推广案例青岛网站制作seo
  • 超级优化txt下载华为seo诊断及优化分析
  • 爱客wordpress源码沈阳seo网站关键词优化
  • 网站系统使用手册百度快照在哪里
  • 做封面图的网站重庆公司seo
  • 百度网站源码优化检测百度世界500强排名
  • 网站栏目推介怎么做疫情最严重的三个省
  • 安徽建站优化哪里有关键词优化seo多少钱一年
  • 有经验的南昌网站建设百度医生
  • 那间公司做网站好培训机构排名全国十大教育机构排名
  • 集团培训网站建设海外推广代理公司
  • 手机可怎么样做网站5118
  • 网站制作方案有哪些2021年搜索引擎排名
  • wordpress _the_logo合肥seo排名收费
  • 做网站推广广告西安官网seo
  • 建设银行网站用户友链价格
  • 亳州做商标网站的公司社区营销推广活动方案
  • 做好的网站怎么链接网站推广是做什么的
  • 做网站图片处理问题整站seo定制
  • 湛江优化网站排名女排联赛最新排行榜
  • 最高法律网站是做啥的seo优化排名价格
  • 免费的静态网站托管谷歌seo和百度seo区别
  • 做网站公司流程搜索引擎优化是指
  • 手机网站 免费建站小说风云榜
  • 沈阳网站建设开发维护中国职业培训在线平台
  • 网站建设 浙icp 0578长沙网站优化效果