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

为君一笑 提交于 2019-12-25 00:16:10

问题


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

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.

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

  • Using my (Intel PC) from the docker command line
  • Using my (Intel Mac) from the docker command line
  • Using QNAP TS131P Container station, (since this is natively Arm maybe this is simpler)

回答1:


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.

  • 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

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



来源:https://stackoverflow.com/questions/52777216/in-docker-hub-is-it-possible-to-build-an-automated-build-for-an-arm-image

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!