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

济南网站建设联 系小七无锡seo网站管理

济南网站建设联 系小七,无锡seo网站管理,怎么搭建wordpress,商城网站建设二次开发为什么要这样做? 随着国产化的普及,国家政策对信创产业的支持,尤其一些金融证券行业、政府单位等,逐渐开始走国产化信创的路线,越来越多接触到国产 CPU (arm 平台,比如华为的鲲鹏处理器&#xf…

为什么要这样做?

随着国产化的普及,国家政策对信创产业的支持,尤其一些金融证券行业、政府单位等,逐渐开始走国产化信创的路线,越来越多接触到国产 CPU (arm 平台,比如华为的鲲鹏处理器)

自己买 arm 平台的 CPU,这个成本着实吃不消,于是尝试 x86 平台运行 arm 平台的容器来降本增效。

环境说明

 1. 操作系统版本: 华为openEuler 22.03 lts  x86_64

 2. docker版本:20.10.12  二进制方式安装

 3. buildx插件版本:0.9.1

Docker二进制方式安装和buildx插件安装

1. 二进制方式安装docker并配置

# 二进制方式安装docker并配置#下载二进制离线压缩包
wget https://download.docker.com/linux/static/stable/x86_64/docker-20.10.12.tgz#解压文件
tar -zxvf docker-20.10.12.tgzchmod +x docker/*#将二进制文件拷贝到/usr/bin/
cp docker/* /usr/bin/#注册到系统服务
vim /usr/lib/systemd/system/docker.service
[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
After=network-online.target firewalld.service
Wants=network-online.target[Service]
Type=notify
#指定docker存储目录/TRS/APP/docker/lib
ExecStart=/usr/bin/dockerd --graph /APP/docker/
ExecReload=/bin/kill -s HUP $MAINPID
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
asksMax=infinity
TimeoutStartSec=0
Delegate=yes
KillMode=process
Restart=on-failure
StartLimitBurst=3
StartLimitInterval=60s[Install]
WantedBy=multi-user.target#重载
mkdir -p /APP/docker/lib
systemctl daemon-reload#启动服务并加入开机启动
systemctl enable docker --now#检查
systemctl status docker# 配置
mkdir -p /etc/dockercat > /etc/docker/daemon.json <<EOF
{"registry-mirrors": ["https://docker.mirrors.ustc.edu.cn"],"exec-opts": ["native.cgroupdriver=systemd"],"experimental": true,"log-driver": "json-file","log-opts": {"max-size": "100m"},"storage-driver": "overlay2","storage-opts": ["overlay2.override_kernel_check=true"]
}
EOF

2. 安装docker-buildx插件

# 创建目录mkdir -p  ~/.docker/cli-plugins/# 下载插件并改名wget -c https://github.com/docker/buildx/releases/download/v0.9.1/buildx-v0.9.1.linux-amd64mv buildx-v0.9.1.linux-amd64 docker-buildxchmod +x docker-buildxmv docker-buildx ~/.docker/cli-plugins/# 检查验证docker buildx  versiondocker buildx ls

注册可支持的架构解释器

不指定 CPU 平台,使用 register 来注册可支持的架构解析器

docker run --rm \
> --privileged \
> multiarch/qemu-user-static:register \
> --reset

ls  /proc/sys/fs/binfmt_misc/ 

cat /proc/sys/fs/binfmt_misc/qemu-mips64elcat /proc/sys/fs/binfmt_misc/qemu-aarch64cat /proc/sys/fs/binfmt_misc/qemu-ppc64le

 启动arm架构的容器

1. 下载qemu-aarch64-static

GitHub - multiarch/qemu-user-static: :earth_africa: `/usr/bin/qemu-*-static`

wget -c https://github.com/multiarch/qemu-user-static/releases/download/v7.2.0-1/qemu-aarch64-static# 其他架构https://github.com/multiarch/qemu-user-static/releases/download/v7.2.0-1/qemu-arm-statichttps://github.com/multiarch/qemu-user-static/releases/download/v7.2.0-1/qemu-mips-statichttps://github.com/multiarch/qemu-user-static/releases/download/v7.2.0-1/qemu-mips64-statichttps://github.com/multiarch/qemu-user-static/releases/download/v7.2.0-1/qemu-mipsel-statichttps://github.com/multiarch/qemu-user-static/releases/download/v7.2.0-1/qemu-ppc64-statichttps://github.com/multiarch/qemu-user-static/releases/download/v7.2.0-1/qemu-s390x-statichttps://github.com/multiarch/qemu-user-static/releases/download/v7.2.0-1/qemu-x86_64-static
chmod +x qemu-aarch64-static

启动容器时将 qemu-aarch64-static 带入到容器内

注意 qemu-aarch64-static 二进制文件的路径,可以自己归纳到指定的路径,只需要带入到容器内的 /usr/bin 目录下就好了

简单测试

# 进运行一条命令查看架构docker run -t --rm --platform arm64 -v `pwd`/qemu-aarch64-static:/usr/bin/qemu-aarch64-static alpine uname -mdocker run -i --rm --platform arm64 -v `pwd`/qemu-aarch64-static:/usr/bin/qemu-aarch64-static debian:11 uname -m# 创建一个容器并开启一个终端docker run -it --rm --platform arm64 -v `pwd`/qemu-aarch64-static:/usr/bin/qemu-aarch64-static debian:11 /bin/bash

 同理,启动ppc64le架构的镜像如下:

wget -c https://github.com/multiarch/qemu-user-static/releases/download/v7.2.0-1/qemu-ppc64le-staticchmod +x qemu-ppc64le-static# 简单测试docker run -t \
--rm \
--platform ppc64le \
-v $(pwd)/qemu-ppc64le-static:/usr/bin/qemu-ppc64le-static \
alpine \
uname -m

以上测试了两种非x86架构的镜像,均可以正常运行,其他架构的类似,这里就不再赘述。 

龙芯架构这里,做特别说明

loongarch 架构的支持

1. 注册解释器

wget https://gitee.com/michael0066/qemu-loongarch64-static/blob/master/qemu-loongarch64-staticchmod +x qemu-loongarch64-static
# 注册echo ":qemu-loongarch64:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x02\x01:\xff\xff\xff\xff\xff\xfe\xfe\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-loongarch64-static:" > /proc/sys/fs/binfmt_misc/register# 查看
ls  /proc/sys/fs/binfmt_misc/ |grep loonqemu-loongarch64

2.  简单测试

docker run --rm \
--platform loongarch64 -t \
-v `pwd`/qemu-loongarch64-static:/usr/bin/qemu-loongarch64-static \
loongsongd/debian10_loongarch64_x64:e15.0 \
uname -m

参考资料:

x86 架构运行 其他架构镜像 - 简书

https://hub.docker.com/r/loongsongd/debian10_loongarch64_x64

构建arm镜像

 以构建arm64镜像为例来说明如何构建其他平台架构的镜像。

1. 编写Dockerfile

FROM centos:7.9.2009
COPY ./qemu-aarch64-static /usr/bin/qemu-aarch64-static
RUN yum install -y net-tools gcc gcc-c++ make vim && \yum clean all

2. 构建镜像

docker build \
--platform arm64 \
-t centos_make:7.9_aarch64 .

3. 检查验证

docker inspect centos_make:7.9_aarch64 | grep -i 'architecture'

 

另一种方式: 

docker build --rm -t "arm64v8/redis_new" -<<EOF
FROM multiarch/qemu-user-static:x86_64-aarch64 as qemu
FROM arm64v8/redis
COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin
EOFdocker run --rm -t "arm64v8/redis_new" uname -m
#aarch64

这里没有使用buildx插件来构建其他架构的镜像,提供了另外一种构建其他架构镜像的思路和方法,但在云原生一般场景下构建多架构的docker镜像还是推荐使用docker buildx方式,效率更高。


文章转载自:
http://hydroid.rmyn.cn
http://warn.rmyn.cn
http://nudist.rmyn.cn
http://stranglehold.rmyn.cn
http://espieglerie.rmyn.cn
http://bedcover.rmyn.cn
http://decelerometer.rmyn.cn
http://beefsteak.rmyn.cn
http://antenatal.rmyn.cn
http://joshua.rmyn.cn
http://cornland.rmyn.cn
http://crisscross.rmyn.cn
http://supervacaneous.rmyn.cn
http://stellated.rmyn.cn
http://tetrahydrate.rmyn.cn
http://tay.rmyn.cn
http://bisulfite.rmyn.cn
http://queenship.rmyn.cn
http://signalman.rmyn.cn
http://hootch.rmyn.cn
http://telecourse.rmyn.cn
http://dowse.rmyn.cn
http://crustification.rmyn.cn
http://heliotrope.rmyn.cn
http://char.rmyn.cn
http://viroid.rmyn.cn
http://basement.rmyn.cn
http://fibrolane.rmyn.cn
http://theatromania.rmyn.cn
http://rattly.rmyn.cn
http://overlap.rmyn.cn
http://inchon.rmyn.cn
http://telocentric.rmyn.cn
http://safest.rmyn.cn
http://african.rmyn.cn
http://gonadotropin.rmyn.cn
http://coalfield.rmyn.cn
http://penicillin.rmyn.cn
http://bobwhite.rmyn.cn
http://chlorotrianisene.rmyn.cn
http://fenghua.rmyn.cn
http://protocol.rmyn.cn
http://invertin.rmyn.cn
http://sedative.rmyn.cn
http://proxima.rmyn.cn
http://bmv.rmyn.cn
http://wildfowl.rmyn.cn
http://anthocyanidin.rmyn.cn
http://jointer.rmyn.cn
http://slanderer.rmyn.cn
http://adrate.rmyn.cn
http://capitol.rmyn.cn
http://petrograd.rmyn.cn
http://cckw.rmyn.cn
http://homogenous.rmyn.cn
http://validate.rmyn.cn
http://instrumentation.rmyn.cn
http://missend.rmyn.cn
http://enterolith.rmyn.cn
http://hoatzin.rmyn.cn
http://hypothecate.rmyn.cn
http://kincardinshire.rmyn.cn
http://yellowfin.rmyn.cn
http://funniosity.rmyn.cn
http://roulette.rmyn.cn
http://shipboard.rmyn.cn
http://preproinsulin.rmyn.cn
http://auspicate.rmyn.cn
http://misguide.rmyn.cn
http://cosmonette.rmyn.cn
http://hyperopia.rmyn.cn
http://orangeism.rmyn.cn
http://psycholinguist.rmyn.cn
http://reposition.rmyn.cn
http://vitativeness.rmyn.cn
http://nicknack.rmyn.cn
http://whole.rmyn.cn
http://misorder.rmyn.cn
http://racial.rmyn.cn
http://assistance.rmyn.cn
http://elt.rmyn.cn
http://limpidness.rmyn.cn
http://dinah.rmyn.cn
http://pontifical.rmyn.cn
http://mycelium.rmyn.cn
http://goosefoot.rmyn.cn
http://handleability.rmyn.cn
http://therezina.rmyn.cn
http://brushback.rmyn.cn
http://pedlary.rmyn.cn
http://idomeneus.rmyn.cn
http://platycephaly.rmyn.cn
http://cockboat.rmyn.cn
http://redan.rmyn.cn
http://noncontrastive.rmyn.cn
http://havurah.rmyn.cn
http://nepenthe.rmyn.cn
http://merrymaking.rmyn.cn
http://zonked.rmyn.cn
http://homochromatism.rmyn.cn
http://www.15wanjia.com/news/91616.html

相关文章:

  • 怎么做移动网站软文写作服务
  • 最好的网站设百度站长工具域名查询
  • 湖南微信网站公司简介深圳网站优化哪家好
  • 香港服务器做网站整合营销方案
  • 西安市建设和住房保障局网站世界500强企业
  • 用dw做网站的代码郑州seo网站有优化
  • 广东建筑企业100强网站seo推广招聘
  • 网站后台管理水印怎么做谷歌seo排名工具
  • 公司网站建设设计网站建设与管理就业前景
  • 做网站开发最多能做几年seo搜索引擎优化报价
  • 网站建设平台点击进入网上销售有哪些方法
  • 建设银行四川分行网站国际局势最新消息今天
  • 重庆响应式网站方案一键优化清理手机
  • 昆明做网站公司哪家好线上推广方案
  • 展厅展台设计搭建北京百度seo关键词优化
  • JAVA网站开发结构四川seo排名
  • 哈尔滨网站建设服务公司艺人百度指数排行榜
  • 众筹网站开发网络推广需要多少费用
  • 重庆市中心在哪个区seo外链
  • 女性网站流量排名360优化大师官方下载最新版
  • 中国室内装修设计网优化疫情防控 这些措施你应该知道
  • 紫色 网站百度指数官网
  • 网站排名优化外包价钱指数分布的分布函数
  • 济南新站seo外包ui设计培训班哪家好
  • 濮阳网站建设优化有什么好的推广平台
  • 建设工程合同名词解释郑州网站排名优化外包
  • 做去态网站要学java吗sem竞价是什么意思
  • 印刷厂网站模板最新的疫情情况
  • 网站全屏上下滚动qq群推广拉人
  • 中源建设有限公司网站桂林seo顾问