DNSCrypt / dnscrypt-server-docker

A Docker image for a non-censoring, non-logging, DNSSEC-capable, DNSCrypt-enabled DNS resolver
https://dnscrypt.info
ISC License
659 stars 134 forks source link

arm64 docker builds #118

Closed xrisk closed 5 months ago

xrisk commented 5 months ago

It would be great to have an official arm64 build. Doing a regular docker build seems to work fine for building the image on arm64, so it shouldn’t be a lot of effort.

jedisct1 commented 5 months ago

It would be great, but I never managed to find the right commands to do so. I either end up with an image that works for x86_64, or an image that works on aarch64, but never both.

My build command is simply:

docker buildx build --load --platform linux/amd64 -t jedisct1/dnscrypt-server:latest .

And to run the containers, I'm using colima on an M1 Mac.

If you know the magic recipe, please share it and I'd be glad to publish images that also work on aarch64!

xrisk commented 5 months ago

These worked for me:

docker buildx create --name multi --bootstrap --use --platform linux/amd64,linux/arm64
docker buildx build --platform linux/amd64,linux/arm64 -t xrisk/dnscrypt-server-docker --push .

Caveat: Colima seems to be very flakey when compiling for amd64. I had better success with Docker Desktop.

jedisct1 commented 5 months ago

Thank you!

A new image was uploaded :)

xrisk commented 5 months ago

@jedisct1 your docker image name is jedisct1/dnscrypt-server (as mentioned in the docs) but you’ve uploaded to jedisct1/dnscrypt-server-docker, probably because I used that image name in my command. Sorry about that!

jedisct1 commented 5 months ago

Yikes.