Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

base镜像增加aarch64 build #88

Open
stevapple opened this issue Feb 28, 2023 · 7 comments
Open

base镜像增加aarch64 build #88

stevapple opened this issue Feb 28, 2023 · 7 comments

Comments

@stevapple
Copy link
Contributor

以避免在不支持Buildx的aarch64环境下遭遇exec format error。

@iBug
Copy link
Member

iBug commented Mar 1, 2023

感觉意义不大,镜像主要用于服务器环境,不如等 aarch64 服务器铺开再说

@stevapple
Copy link
Contributor Author

主要是在本地测试的过程中遇到了一些问题,最后不得不改用 alpine:latest 否则无法顺利 build。

@taoky
Copy link
Member

taoky commented Mar 1, 2023

主要是在本地测试的过程中遇到了一些问题,最后不得不改用 alpine:latest 否则无法顺利 build。

具体是什么问题呢?

@stevapple
Copy link
Contributor Author

stevapple commented Mar 1, 2023

Docker 18 (Linux aarch64) 以 ustcmirror/base:alpine 为基础镜像进行构建时,RUN apk add 报 exec format error(来源是 Docker 引擎内部的 go 代码)。

@taoky
Copy link
Member

taoky commented Mar 1, 2023

Docker 18 (Linux aarch64) 以 ustcmirror/base:alpine 为基础镜像进行构建时,RUN apk add 报 exec format error(来源是 Docker 引擎内部的 go 代码)。

可以用 qemu-user 跑吗?比如说 https://github.com/multiarch/qemu-user-static

@taoky
Copy link
Member

taoky commented Mar 1, 2023

主要是:

  • 目前这一套东西没有 aarch64 用户
  • 如果要加 aarch64,构建脚本要大改,而且就目前情况也不太容易后续维护,可能哪天坏了要等很久才能发现

@stevapple
Copy link
Contributor Author

可以用 qemu-user 跑吗?比如说 multiarch/qemu-user-static

Docker BuildKit(通过 docker buildx)应该是类似的机制,但是需要 Docker 19.03+,部分发行版官方源版本不够高。

  • 如果要加 aarch64,构建脚本要大改,而且就目前情况也不太容易后续维护,可能哪天坏了要等很久才能发现

是个很切实的问题,可能短期内还是需要借助 BuildKit/QEMU。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants