在 Docker Hub 中是否可以为 Arm 镜像构建自动构建 [英] In Docker Hub Is it possible to build an automated build for an Arm Image

查看:62
本文介绍了在 Docker Hub 中是否可以为 Arm 镜像构建自动构建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Docker Hub 网站上是否可以为 Arm 镜像构建自动构建?

In Docker Hub website Is it possible to build an automated build for an Arm Image ?

我已经修改了我现有的 DockerFile 以使用 Arm 基础映像,但是当它尝试运行带有 exec format errorapk 命令时,它在下一行失败.因此,尽管基本映像是为 Arm 构建的,但看起来 Docker Hub 正试图构建为 Intel.

I have modified my existing DockerFile to use an Arm base image, but it fails on the next line when it tries to run the apk command with exec format error. So it looks like Docker Hub is trying to build as Intel despite base image being built for Arm.

是否可以使用 Docker Hub 网站构建 Arm 镜像?

Is it possible to build Arm image with Docker Hub website or not ?

如果没有,任何人都可以通过

If not can anyone provide succint instructions on how to build Arm Image from my Dockerfile either by

  • 从 docker 命令行使用我的(英特尔 PC)
  • 从 docker 命令行使用我的(Intel Mac)
  • 使用 QNAP TS131P Container Station,(因为这是原生的 Arm,也许这更简单)

推荐答案

结果证明使用 QNAP 相对容易,比我读过的帖子要简单得多,我想我的困惑是这些帖子是关于构建 Arm 版本在 Intel 机器上,我不需要这样做.并且所有 Arm 特定的指令都是针对 Raspberry Pi 的,它有自己的问题.

Turned out to be relatively easy using the QNAP, alot simpler than it seemed from the posts I had read, I think my confusion was these posts were about building Arm version on an Intel machine, which i didnt need to do. And all the Arm specific instructions were for Raspberry Pi which had its own problems.

  • 在 DockerHub 中创建了新的空存储库
  • 将我的 DockerFile 上传到我的网络服务器
  • ssh qnapserver
  • docker build DockerFileUrl
  • docker login DockerHubUsername DockerHubPassword
  • docker 镜像(获取构建镜像的 imageId)
  • docker tag imageId DockerHubNameSpace/DockerHubRepository:latest
  • docker push DockerHubNameSpace/DockerHubRepository:latest
  • Created new empty repository in DockerHub
  • Uploaded my DockerFile to my webserver
  • ssh qnapserver
  • docker build DockerFileUrl
  • docker login DockerHubUsername DockerHubPassword
  • docker images (to get imageId of built image)
  • docker tag imageId DockerHubNameSpace/DockerHubRepository:latest
  • docker push DockerHubNameSpace/DockerHubRepository:latest

推送成功了,然后我可以使用 ContainerStation 从 Docker Hub 获取镜像并在容器中运行.

The push worked, and I was then able to use ContainerStation to get the image from Docker Hub and run in a container.

这篇关于在 Docker Hub 中是否可以为 Arm 镜像构建自动构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆