Closed psyciknz closed 5 years ago
No you can't, because the images are based on amd64 alpine image.
Unless I rewrote your dockerfile for arm64v8.
Does that mean for the build function I need goos=Linux and goarch=arm64.
I’m trying that anyway.
On Sat, 8 Sep 2018 at 12:34, Abiola Ibrahim notifications@github.com wrote:
No you can't, because the images are based on amd64 alpine image.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/abiosoft/caddy-docker/issues/140#issuecomment-419598793, or mute the thread https://github.com/notifications/unsubscribe-auth/AFGkc7Rp_82NogcOOU_yh4FtHUkDgAMDks5uYxCQgaJpZM4Wfi1m .
Oh, I misread your message. If it is simply to generate binaries, you can generate for any platform supported by Go including arm64 as indicated here.
docker run --rm -v $(pwd):/install \
-e PLUGINS=git,filemanager \
-e GOARCH=arm64 \
abiosoft/caddy:builder
@Maxiride Yes, that is official binaries from caddy's build servers. This image builds from source and leverages Docker. https://github.com/abiosoft/caddy-docker#license
It still doesn't pull the correct image architecture. I tried on an armv7 and received an exec format error. I believe it has something to do with the builder script which has fixed architecture on it. After cloning and removing these lines, I managed to make it work building the docker images locally.
I don't know exactly how is the build process on dockerhub but I already seem a lot of images that have multi arch build there. eg. the images from https://www.linuxserver.io/
Can i use the existing Dockerfile for generating binaries for arm/arm64 and x86?
It seems to hang on the git pull on the arm servers.
I'm hoping to use this guys framework https://lobradov.github.io/Building-docker-multiarch-images/ to pull the right alpine images so that I can build for all archs.