Building custom docker image on arm64

I’m trying to generate a custom abisoft/caddy:latest docker image with extra plugins for my QNAP NAS. The problem is the arch of the NAS is arm64, and even arm64 versions of caddy on Dockerhub call the amd64 docker-build container.

What is the simplest way I can script a custom build for arm64? I’ve found an arm64 docker image for docker-build. Is the resulting binary produced by docker-build container easy to wrap in another container? Or can docker-build itself run the resulting executable?

Thanks for any help.

From the Github repo with @abiosoft’s builder:

  • GOOS , GOARCH and GOARM are all supported. Default GOOS=linux , GOARCH=amd64

caddy-docker/ at master · abiosoft/caddy-docker · GitHub

I believe you should be able to set the GOARCH env var in the container to have the builder output a binary for the specified platform.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.