绿联NAS运用指南|从根源处理docker没法拉取问题!
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">大概在7月初的时候国内Docker镜像纷纷<span style="color: black;">起始</span>拉取不了了,在网上给我的绿联NAS找了<span style="color: black;">非常多</span>加速器,用了一段时间后又<span style="color: black;">没法</span><span style="color: black;">运用</span>了,<span style="color: black;">因此</span><span style="color: black;">始终</span><span style="color: black;">处在</span>反复更换、反复限速、反复<span style="color: black;">没法</span><span style="color: black;">运用</span>的状态。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">说实话国内的镜像站停止服务这件事,其实它带来的影响还是很大的,<span style="color: black;">没法</span>拉取或上传容器镜像文件,<span style="color: black;">针对</span>我这种重度docker用户来讲,简直要了老命!</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">后来我就想啊~既然docker pull<span style="color: black;">亦</span><span style="color: black;">便是</span>拉取这个环节我<span style="color: black;">处理</span>不了,那能<span style="color: black;">不可</span>跳过pull, 而是直接上传安装包到NAS里再进行运行呢?经过我的一番<span style="color: black;">奋斗</span>(搜索),嘿嘿,还真有~感谢互联网时代!</span></p>
<div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-axegupay5k/205ef779254647e18b69fd7c95e5c2ec~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1729690819&x-signature=3X5YJH0uZVJGP6XlLTm8KQw9ZcE%3D" style="width: 50%; margin-bottom: 20px;"></div>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">我<span style="color: black;">发掘</span>有大神<span style="color: black;">供给</span>了类似<span style="color: black;">这般</span>的<span style="color: black;">处理</span>办法,<span style="color: black;">重点</span>是<span style="color: black;">经过</span>Github Action的方式来获取docker容器离线包,我<span style="color: black;">这里</span><span style="color: black;">亦</span>是借花献佛,<span style="color: black;">由于</span>好东西<span style="color: black;">必定</span>是要分享给<span style="color: black;">大众</span>的啦~</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">我的NAS是绿联家的DXP4800,<span style="color: black;">倘若</span>你的NAS<span style="color: black;">亦</span>支持Docker的话,<span style="color: black;">亦</span>是<span style="color: black;">能够</span><span style="color: black;">运用</span>该教程的,<span style="color: black;">大众</span>跟着我<span style="color: black;">循序渐进</span>操作就好~</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">首要</span><span style="color: black;">咱们</span>需要注册一个Github的账号(<span style="color: black;">倘若</span>你<span style="color: black;">已然</span>有了账号<span style="color: black;">能够</span>直接登录,无需再重复注册)</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">1、<span style="color: black;">第1</span>步:注册账号</span></strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">首要</span>打开网址:https://github.com,输入自己的邮箱-点击注册,<span style="color: black;">而后</span>再创建输入自己的用户名和<span style="color: black;">秘码</span>,点击continue,后面<span style="color: black;">按照</span><span style="color: black;">过程</span>,做<span style="color: black;">有些</span>验证题来<span style="color: black;">暗示</span>不是<span style="color: black;">设备</span>人;</span></p>
<div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-6w9my0ksvp/187d5e84848e4532bbcbdda430b68b16~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1729690819&x-signature=gBEqfN64Y7EGJCpXUSvdfIcQDqw%3D" style="width: 50%; margin-bottom: 20px;"></div>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">做完题目,<span style="color: black;">经过</span>验证之后,就<span style="color: black;">能够</span>输入邮箱里收到的验证码了,到<span style="color: black;">这儿</span><span style="color: black;">咱们</span>就能完成注册了;随后会自动<span style="color: black;">转</span>至登录页面,输入用户名和<span style="color: black;">秘码</span>,点击sign in就<span style="color: black;">能够</span>了;</span></p>
<div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-6w9my0ksvp/6e9d81b446154f6f872b6e790508f0c7~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1729690819&x-signature=nbNVjhDn6QTMe8SgU%2FVR7C67N4w%3D" style="width: 50%; margin-bottom: 20px;"></div>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">到<span style="color: black;">这儿</span><span style="color: black;">表示</span>以下的页面,就<span style="color: black;">显示</span><span style="color: black;">咱们</span><span style="color: black;">已然</span><span style="color: black;">持有</span>了Github的个人账号了。</span></p>
<div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-6w9my0ksvp/776f6b59029645ecb5d340602b42e7e0~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1729690819&x-signature=IH6WnFfZVSxtWkV5f1xFKJKOL6s%3D" style="width: 50%; margin-bottom: 20px;"></div>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">不外</span>我身边<span style="color: black;">亦</span>有小伙伴们反映说,Github有时候会<span style="color: black;">显现</span>响应慢和登陆不上的<span style="color: black;">状况</span>,这其实是属于正常现象,<span style="color: black;">大众</span><span style="color: black;">能够</span>换个时间段<span style="color: black;">或</span>用手机流量再多试试看。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">2、第二步:下载镜像</span></strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">点击这个网址:https://github.com/wukongdaily/DockerTarBuilder,<span style="color: black;">能够</span>Fork下原大神的项目,进入网页之后,点击右上角的【Fork】</span></p>
<div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-6w9my0ksvp/3a628751eb1a42378e93f619e9931360~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1729690819&x-signature=1nXhrzGEWfk0rj7TrbFCScZbuaw%3D" style="width: 50%; margin-bottom: 20px;"></div>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">到<span style="color: black;">这儿</span>名<span style="color: black;">叫作</span>之类的保持默认就好,点击create fork,<span style="color: black;">这般</span>就<span style="color: black;">能够</span>把该项目添加到个人空间。</span></p>
<div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-6w9my0ksvp/a94d84de73504c9eac3dac6cc987a951~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1729690819&x-signature=kd1csRFrc27KaUKXFru4pvkgVao%3D" style="width: 50%; margin-bottom: 20px;"></div>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">转</span>页面后,随即点击左上角的actions,再点击这个绿色栏,这样<span style="color: black;">咱们</span>就<span style="color: black;">能够</span>启用工作流了。</span></p>
<div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-6w9my0ksvp/31c48f11288c40ec9123b0a19cc8f2c1~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1729690819&x-signature=g%2BLVshiOz0hKEOG%2FKfkMH3OUCIo%3D" style="width: 50%; margin-bottom: 20px;"></div>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">在左侧<span style="color: black;">表示</span>的<span style="color: black;">便是</span>Arm32<span style="color: black;">表率</span>32位的docker镜像,Arm64就<span style="color: black;">表率</span>64位的,还有<span style="color: black;">便是</span>X86-64平台的,<span style="color: black;">大众</span>按需<span style="color: black;">选取</span>就行。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">找到右侧的执行工作流(Run workflow),点击后在输入框里输入想要下载的镜像源名<span style="color: black;">叫作</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">而后</span>点击执行(Run workflow)</span></p>
<div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-6w9my0ksvp/a6feb53e78c846b0a4bfed8e4165bd0d~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1729690819&x-signature=T0XshAugMKKJq5eLZN16u0Ue374%3D" style="width: 50%; margin-bottom: 20px;"></div>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(温馨提示:<span style="color: black;">大众</span>需要<span style="color: black;">保证</span> docker 镜像源名字是正确的,避免拉取错误或搜索不出来,我<span style="color: black;">通常</span>是去docker hub上直接复制镜像源名字的全<span style="color: black;">叫作</span>。<span style="color: black;">例如</span>:智能家居HomeAssistant,全<span style="color: black;">叫作</span>是homeassistant/home-assistant:latest)</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">按照</span>镜像<span style="color: black;">体积</span>的<span style="color: black;">区别</span>,拉取的时间<span style="color: black;">亦</span>会<span style="color: black;">区别</span>,静静等待直到看到小勾<span style="color: black;">表示</span>绿色,说明<span style="color: black;">已然</span>上传到Github服务器了,最后看到这个离线的镜像就<span style="color: black;">能够</span>直接点击下载了。</span></p>
<div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-6w9my0ksvp/7353ba21c95b4e839f7755b864685599~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1729690819&x-signature=D7iFYgGOSsNryiamOMkC7ywpsqw%3D" style="width: 50%; margin-bottom: 20px;"></div>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">不外</span><span style="color: black;">这儿</span>要提示下,有时候下载的速度<span style="color: black;">亦</span>是快慢不一,这个没办法评判,<span style="color: black;">不外</span>从我个人测试的<span style="color: black;">状况</span>来看<span style="color: black;">通常</span><span style="color: black;">夜晚</span>的时候会稍微快一点,可能是<span style="color: black;">运用</span>的人比较少。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">3、第三步:<span style="color: black;">怎样</span>加载离线镜像</span></strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">下载完成后<span style="color: black;">咱们</span>会<span style="color: black;">发掘</span>它是压缩包(zip)格式,<span style="color: black;">咱们</span>就需要对它进行解压,解压一次之后转为tar.gz格式,需要再进行二次解压,<span style="color: black;">最后</span>要是tar归档文件格式,就成功啦~</span></p>
<div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-6w9my0ksvp/2926b93fbfcc44d59ceff8a1fdb5cd23~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1729690819&x-signature=Ye%2BKeVKi85dFkvgFkntZ%2BwxBGFA%3D" style="width: 50%; margin-bottom: 20px;"></div>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">4、第四步:导入创建</span></strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">将<span style="color: black;">最后</span>压缩的Tar格式的文件上传至NAS里<span style="color: black;">保留</span>,<span style="color: black;">亦</span><span style="color: black;">能够</span>直接一键外链分享给其他好友,<span style="color: black;">由于</span>绿联NAS有自带远程<span style="color: black;">拜访</span>功能的,只要开启UGREENlink就<span style="color: black;">能够</span>了,独乐乐不如众乐乐<span style="color: black;">吗</span>哈哈哈哈。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">随即<span style="color: black;">咱们</span>打开docker-镜像-本地镜像,点击添加镜像,<span style="color: black;">选取</span>从NAS端导入;</span></p>
<div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-6w9my0ksvp/bf5c5b7941a540eaac1eed2544229cdc~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1729690819&x-signature=yd13S5FeEJAxrqPD159urzMaBL4%3D" style="width: 50%; margin-bottom: 20px;"></div>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">找到离线包之后,就<span style="color: black;">能够</span>上传啦,随即点击加号就能手动创建容器了,完成后就<span style="color: black;">能够</span>正常运行容器啦~</span></p>
<div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-6w9my0ksvp/42427b3e94de4403b63a5431ec10fb20~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1729690819&x-signature=HfXUM3eSe4fylCc%2B%2B3S5fwUdtRE%3D" style="width: 50%; margin-bottom: 20px;"></div>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">小伙伴们<span style="color: black;">能够</span>都去试试看,毕竟获取到离线下载包之后就<span style="color: black;">能够</span>很方便地在多个设备或环境中进行<span style="color: black;">安排</span>,<span style="color: black;">况且</span>在局域网环境下<span style="color: black;">运用</span><span style="color: black;">能够</span><span style="color: black;">不消</span>上传到云端,安全更有<span style="color: black;">保证</span>。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">好啦,<span style="color: black;">倘若</span>本篇<span style="color: black;">文案</span>对你有<span style="color: black;">帮忙</span>的话,欢迎多多点赞、评论哦~下期再见啦</span></p>
页:
[1]