首页 > 其他分享 >docker跨平台exec format error

docker跨平台exec format error

时间:2022-12-22 13:58:56浏览次数:63  
标签:bin binfmt 跨平台 static usr error interpreter docker qemu

linux环境运行arm docker镜像

docker run -it arm64v8/ubuntu:v2 /bin/sh
exec /bin/sh: exec format error
docker run --rm --privileged multiarch/qemu-user-static:register

Unable to find image 'multiarch/qemu-user-static:register' locally
register: Pulling from multiarch/qemu-user-static
f5b7ce95afea: Pull complete
22ee763f0af7: Pull complete
30abb83a18eb: Pull complete
0657daef200b: Pull complete
Digest: sha256:bbe5fdf4113583f462b3a7df6ea1fbf249a0b550e313d0d6878872b41a07e166
Status: Downloaded newer image for multiarch/qemu-user-static:register
Setting /usr/bin/qemu-alpha-static as binfmt interpreter for alpha
Setting /usr/bin/qemu-arm-static as binfmt interpreter for arm
Setting /usr/bin/qemu-armeb-static as binfmt interpreter for armeb
Setting /usr/bin/qemu-sparc-static as binfmt interpreter for sparc
Setting /usr/bin/qemu-sparc32plus-static as binfmt interpreter for sparc32plus
Setting /usr/bin/qemu-sparc64-static as binfmt interpreter for sparc64
Setting /usr/bin/qemu-ppc-static as binfmt interpreter for ppc
Setting /usr/bin/qemu-ppc64-static as binfmt interpreter for ppc64
Setting /usr/bin/qemu-ppc64le-static as binfmt interpreter for ppc64le
Setting /usr/bin/qemu-m68k-static as binfmt interpreter for m68k
Setting /usr/bin/qemu-mips-static as binfmt interpreter for mips
Setting /usr/bin/qemu-mipsel-static as binfmt interpreter for mipsel
Setting /usr/bin/qemu-mipsn32-static as binfmt interpreter for mipsn32
Setting /usr/bin/qemu-mipsn32el-static as binfmt interpreter for mipsn32el
Setting /usr/bin/qemu-mips64-static as binfmt interpreter for mips64
Setting /usr/bin/qemu-mips64el-static as binfmt interpreter for mips64el
Setting /usr/bin/qemu-sh4-static as binfmt interpreter for sh4
Setting /usr/bin/qemu-sh4eb-static as binfmt interpreter for sh4eb
Setting /usr/bin/qemu-s390x-static as binfmt interpreter for s390x
Setting /usr/bin/qemu-aarch64-static as binfmt interpreter for aarch64
Setting /usr/bin/qemu-aarch64_be-static as binfmt interpreter for aarch64_be
Setting /usr/bin/qemu-hppa-static as binfmt interpreter for hppa
Setting /usr/bin/qemu-riscv32-static as binfmt interpreter for riscv32
Setting /usr/bin/qemu-riscv64-static as binfmt interpreter for riscv64
Setting /usr/bin/qemu-xtensa-static as binfmt interpreter for xtensa
Setting /usr/bin/qemu-xtensaeb-static as binfmt interpreter for xtensaeb
Setting /usr/bin/qemu-microblaze-static as binfmt interpreter for microblaze
Setting /usr/bin/qemu-microblazeel-static as binfmt interpreter for microblazeel
Setting /usr/bin/qemu-or1k-static as binfmt interpreter for or1k
Setting /usr/bin/qemu-hexagon-static as binfmt interpreter for hexagon
docker images

REPOSITORY                                           TAG        IMAGE ID       CREATED        SIZE
arm64v8/ubuntu                                       18.04      b50746e2e981   13 days ago    56.7MB
multiarch/qemu-user-static                           register   b7e21e09f745   2 months ago   1.27MB

下载
https://github.com/multiarch/qemu-user-static/releases/download/v5.1.0-2/qemu-aarch64-static.tar.gz

添加参数

tar xvf qemu-aarch64-static.tar.gz
docker run -it -v /home/zxc/qemu-aarch64-static:/usr/bin/qemu-aarch64-static arm64v8/ubuntu:v2 /bin/sh

标签:bin,binfmt,跨平台,static,usr,error,interpreter,docker,qemu
From: https://www.cnblogs.com/zhangxuechao/p/16998435.html

相关文章

  • 【疑难杂症】vue npm run build的时候遇到Module build failed: Error: No ESLint con
    有一天某个项目轮到我手里,兴高采烈的运行结果……我去这…… 直接找到config/index.js......
  • docker 和docker-compse安装
    安装docker`先移除旧版dockersudoyumremovedocker安装一些必要的系统工具sudoyuminstall-yyum-utilsdevice-mapper-persistent-datalvm2添加软件源信息sudo......
  • FATAL ERROR: Received unexpected end-of-file from SFTP server
    问题描述原因密码过期解决方案使用root登录,更改子用户密码,更改完之后再连接ftp......
  • 关于docker容器-ibmcom/db2-amd64
    关于docker容器- ibmcom/db2-amd64 VerifiedPublisher ByIBM • Updated2monthsagoDb2-TheAIDatabase Image Pulls10K+Overv......
  • Docker平台构建&nginx&tmcat容器
    Docker平台构建&nginx&tmcat容器一.虚拟机化概念&搭建虚拟机化平台1虚拟化技术的概念虚拟化技术主要是将物理的资源转变为逻辑上可以管理的资源,以打破物理资源结构......
  • Docker常用命令
    学习Docker查看容器:dockerps查看所有容器:dockerps-a启动一个容器:dockerstartxxxx查看镜像dockerimages根据镜像创建一个容器dockercreate-p3000:80--na......
  • Docker高级篇:实战Redis集群!从3主3从变为4主4从
    通过前面两篇,我们学会了三主三从的Redis集群搭建及主从容错切换迁移,随着业务增加,可能会有主从扩容的,所以,本文我们来实战主从扩容PS本系列:《Docker学习系列》教程已经发布的......
  • Docker 笔记
    title:Docker笔记.mddate:2022-12-1917:02:34tags:-Docker什么是Docker?官方介绍wehelpdevelopersanddevelopmentteamsbuildandshipapps.我们帮助开......
  • docker-02
    一、私有仓库  dockerpull拉取,都是从hub.docker上拉取的,公司自己做的docker镜像,放在哪比较合适?dockerpush推到hub.docker,如果是公开,大家都可以下载,公司内部只希望公......
  • 【Python】爬虫笔记-TypeError: Object of type 'method' is not JSON serializable
    最近尝试对b站做数据分析,自己边学边造轮子。b站的api返回的格式都是json,在对数据进行格式转换的过程中遇到一个令人哭笑不得的问题,特此记录下来。0x01首先获得b站的api......