dockerarmqnap

How do I build an Arm version of Docker File for Qnap Arm based Server


I have a Docker File for my application and I use Docker Hub to build it. This works fine on a Synology DS218+ Disk Station, which is Intel based.

Qnap supports Docker on both Intel and Arm devices with its Container Station software , I have purchased a TS131P to test this out but it failed with exec format error. Apparently I have to build an Arm version of the image, but how do I do this ?

Can I build the image on the Qnap itself somehow ?

Update

So my base image was openjdk:8-jre-alpine, so I have found on DockerHub an arm32 equivalent of this, https://hub.docker.com/r/arm32v6/openjdk/ so now:

But the build is now failing on the second line

RUN apk --no-cache add \
       curl \
       tini

with

[91mstandard_init_linux.go:190: exec user process caused "exec format error"

Since I am using arm image I assume that apk should be compiled for arm, or do I need to tell Docker Hub to build on Arm rather than Intel ?


Solution

  • The simple answer is you have to build an arm image on an arm server, so I built in on the Arm nas itself, since this supports Docker, this is what I did

    and this was enough to make arm32 version available to be installed on arm32 machine.

    Currently I have two separate images, one for Intel and one for Arm. I understand that there is a way to combine multiple images into a single super image, but I have not attempted that yet. repoName/imageName:latest