In Docker Hub Is it possible to build an automated

2019-09-05 14:14发布

问题:

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.