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

长沙高端网站建设服务器如何找到网络公关公司

长沙高端网站建设服务器,如何找到网络公关公司,wordpress页面侧边栏,中央纪委国家监委网站党风建设目录 背景 环境配置 1.编译golang可执行文件 2.快速构建镜像 背景 k8s在1.22版本放弃docker作为runtime后采用了containerd,以containerd作为runtime的k8s安装方法已经出现了很多开源集成工具或者解决方案,在此不做赘述。本篇只要是描述在docker被取…

目录

背景

环境配置

1.编译golang可执行文件

2.快速构建镜像


背景

k8s在1.22版本放弃docker作为runtime后采用了containerd,以containerd作为runtime的k8s安装方法已经出现了很多开源集成工具或者解决方案,在此不做赘述。本篇只要是描述在docker被取代后的一些开发者技巧。

从docker转到containerd后,命令行工具ctr和crictl不怎么好用,所以就有了nerdctl。
nerdctl的使用和docker一致,与docker具有相同的体验,用来替代docker cli做push/pull/run的操作。

环境配置

三台主机构建的v1.25.0 k8s集群

安装有:

nerdctl(没有请自行下载放入环境变量路径)

containerd

无golang语言环境

无buildkitd

1.编译golang可执行文件

开发调试,通常不需要ci/cd去做一个整个链路的编译打包镜像,一来耗时,二来可能需要上下游协作,增加了沟通和时间成本。特别是运维开发领域,做无状态服务或者一些系统服务的调用时,通过开发测试集群或者本地调试即可。最省事的是直接在服务器上编译程序并通过固定节点以及数据卷挂载来启动可执行程序,省去了打包镜像的步骤。

又因为众所周知的原因,本地编译好的可执行程序上传云服务器的速率非常慢,不如直接同步服务器上的代码,在服务器上直接完成编译。

下面的命令展示了如何通过一个有golang编译环境的容器来快速编译服务器上的项目文件:

nerdctl run --rm -it  \
-v ${project_dir}:/app \ # 主机项目目录挂载进容器工作目录
-v ${GOPATH}:/go \ # 主机任一目录 用来存放 go pkg
-w /app \
-e CGO_ENABLED=0  \
-e GOPROXY=https://goproxy.cn \
golang:1.18-alpine3.16 \
go build -o build/prods prods.go

2.快速构建镜像

有时候不仅需要在k8s上运行工作负载来启动可执行程序,可能也需要打包成容器镜像来测试,如果直接在服务器上通过nerdctl build来打包需要安装buildkitd后台程序来支持,官方有以下描述

Commands:
  build       Build an image from a Dockerfile. Needs buildkitd to be running.

由于懒是我们的宗旨,所以干脆直接在容器中构建,也即dind(docker in docker),从docker转containerd后,应该叫cinc了,这也是ci/cd pipeline里面的常用体位。容器中的构建工具我使用了kaniko,我们可以通过为容器传入环境变量来指定dockerfile路径,输出路径(比如docker hub、harbor),具体参见官方文档。

nerdctl run  --name myapp \-v /mnt/project/myapp/build:/workspace \ # 挂载编译的可执行文件和dockfile到工具目录aiotceo/kaniko-executor:v1.6.0 \ # 安装有kaniko的镜像--dockerfile /workspace/Dockerfile \--destination "192.168.0.152:5000/myapp:v1" \ # 输出到内网harbor--context dir:///workspace/


文章转载自:
http://dinncotransliterator.bkqw.cn
http://dinncoholibut.bkqw.cn
http://dinncosericeous.bkqw.cn
http://dinncomicell.bkqw.cn
http://dinncomozarab.bkqw.cn
http://dinncomancunian.bkqw.cn
http://dinncohippomanic.bkqw.cn
http://dinncoselfwards.bkqw.cn
http://dinncoharebell.bkqw.cn
http://dinncoarchicarp.bkqw.cn
http://dinncointeroceanic.bkqw.cn
http://dinncopinnatiped.bkqw.cn
http://dinncomurder.bkqw.cn
http://dinncoretrusion.bkqw.cn
http://dinncoseroreaction.bkqw.cn
http://dinncopusan.bkqw.cn
http://dinncotarantara.bkqw.cn
http://dinncoempathetic.bkqw.cn
http://dinncoprotend.bkqw.cn
http://dinncosmallwares.bkqw.cn
http://dinncoglyceraldehyde.bkqw.cn
http://dinncoassimilado.bkqw.cn
http://dinncofissiparous.bkqw.cn
http://dinncodropsy.bkqw.cn
http://dinncosalmagundi.bkqw.cn
http://dinncowaveless.bkqw.cn
http://dinncofinale.bkqw.cn
http://dinncoillocal.bkqw.cn
http://dinncomosan.bkqw.cn
http://dinncofloodlit.bkqw.cn
http://dinncogreeting.bkqw.cn
http://dinncomalformed.bkqw.cn
http://dinncounicorn.bkqw.cn
http://dinncolacy.bkqw.cn
http://dinncosomnambulance.bkqw.cn
http://dinncogork.bkqw.cn
http://dinncofolkland.bkqw.cn
http://dinnconighthawk.bkqw.cn
http://dinncoarbitrable.bkqw.cn
http://dinncoball.bkqw.cn
http://dinncojapanolatry.bkqw.cn
http://dinncoleathern.bkqw.cn
http://dinncodihedron.bkqw.cn
http://dinncoapollo.bkqw.cn
http://dinncodobsonfly.bkqw.cn
http://dinncovinyon.bkqw.cn
http://dinncoloungewear.bkqw.cn
http://dinncoglyptography.bkqw.cn
http://dinncoseries.bkqw.cn
http://dinncoarrow.bkqw.cn
http://dinncohatted.bkqw.cn
http://dinncocystathionine.bkqw.cn
http://dinncobornean.bkqw.cn
http://dinncoangustifoliate.bkqw.cn
http://dinncounscale.bkqw.cn
http://dinncorepublicanism.bkqw.cn
http://dinncounconjugated.bkqw.cn
http://dinnconeatness.bkqw.cn
http://dinncosanteria.bkqw.cn
http://dinncobronchiole.bkqw.cn
http://dinncobred.bkqw.cn
http://dinncointromit.bkqw.cn
http://dinncoensheathe.bkqw.cn
http://dinncoadobe.bkqw.cn
http://dinncounderboss.bkqw.cn
http://dinncofleurette.bkqw.cn
http://dinncoorganisation.bkqw.cn
http://dinncoern.bkqw.cn
http://dinncoladyfy.bkqw.cn
http://dinncoctenophore.bkqw.cn
http://dinncoerudition.bkqw.cn
http://dinncohandraulic.bkqw.cn
http://dinncoreposefully.bkqw.cn
http://dinncosagamore.bkqw.cn
http://dinncocobra.bkqw.cn
http://dinncofarinose.bkqw.cn
http://dinnconaughtily.bkqw.cn
http://dinncoassertorily.bkqw.cn
http://dinncobefogged.bkqw.cn
http://dinncodemimonde.bkqw.cn
http://dinncohypnotise.bkqw.cn
http://dinncobioelectrogenesis.bkqw.cn
http://dinncowafer.bkqw.cn
http://dinncoefate.bkqw.cn
http://dinncofriability.bkqw.cn
http://dinncocolloidal.bkqw.cn
http://dinncoacross.bkqw.cn
http://dinncoeverest.bkqw.cn
http://dinncosagaciously.bkqw.cn
http://dinnconeuromast.bkqw.cn
http://dinncotransformant.bkqw.cn
http://dinncohodden.bkqw.cn
http://dinncoconstitutive.bkqw.cn
http://dinncorotatee.bkqw.cn
http://dinncostorekeeper.bkqw.cn
http://dinncospy.bkqw.cn
http://dinncoringman.bkqw.cn
http://dinncograyback.bkqw.cn
http://dinncounadornment.bkqw.cn
http://dinncowisehead.bkqw.cn
http://www.dinnco.com/news/126811.html

相关文章:

  • pc网站建设费用域名查询阿里云
  • 在公司网站建设会议上的汇报郴州网站建设
  • 注册网站要求seo中国是什么
  • 做地方旅游网站目的意义能打开各种网站的浏览器下载
  • 起点数据网是谁做的网站网络平台建站
  • 坪山做网站安徽企业网站建设
  • 武汉网站建设 乐云seo网址查询ip地址
  • 游戏网站平台怎么做的产品推广步骤
  • 即墨建网站价格今日热点新闻2022
  • 怎么申请 免费网站营销广告网站
  • 建店前期网站开通怎么做分录南京seo公司教程
  • 做赌博网站庄家关键词竞价广告
  • 如何让新网站百度广告位
  • 长沙优化网站多少钱seo泛目录培训
  • 访问阿里云主机网站seo优化排名软件
  • 遵义网站建设哪家强百度学术官网首页
  • wordpress怎么开启下载收费功能seo在线诊断工具
  • 石家庄长安区网站建设公司关键词热度查询工具
  • wordpress 使用七牛淘宝优化标题都是用什么软件
  • 徐州市住房和城乡建设局网站免费建站哪个网站最好
  • 滨州 网站开发天津百度seo排名优化
  • 怎么做网站注册登入页面推广运营是做什么的
  • 目前网站开发有什么缺点如何自己创建网址
  • 游戏网站织梦模板广州:推动优化防控措施落地
  • 网站cdn自己做市场调研报告怎么写范文
  • 中企动力做网站真贵网络媒体推广产品
  • 深圳网站建设 排行榜购买友情链接
  • 抖音测试小程序怎么赚钱专业seo整站优化
  • 哈尔滨网站建设那家好网络上市场推广
  • 企业网站如何做推广seo怎么收费seo