kereis / traefik-certs-dumper

Dumps Let's Encrypt certificates of a specified domain which Traefik stores in acme.json.
Apache License 2.0
129 stars 24 forks source link

Add support for arm64/armhf builds #21

Closed rfgamaral closed 4 years ago

rfgamaral commented 4 years ago

This change adds support for multi-arch images (arm64/armhf) which includes devices like a Raspberry Pi. I've also changed the base build image to ldez/traefik-certs-dumper instead of docker which simplifies the image and makes it smaller.

This won't do anything by itself, you'll need to update your build process to build each Dockerfile individually, push them to Docker Hub individually and then create and push a manifest file with the proper tags.

I personally use GitHub Actions for all of this and although I don't have the most simplified process, here's an example for you:

I've also did a similar thing to my fork just for testing purposes:

kereis commented 4 years ago

Hi,

the current image uses Docker due to restart functionality. However, #8 addresses this issue indirectly which means it's not a bad idea to use ldez/traefik-certs-dumper as a base image. It's fine too to add multi-arch images as well.

I quickly scanned over it and it looks fine to me, but we may

About #8: Maybe we can consider combining issues together

rfgamaral commented 4 years ago

the current image uses Docker due to restart functionality.

I wasn't aware of this, sorry... I guess #8 needs to be done first. Or maybe I shouldn't have made two changes in one PR, sorry about that.

kereis commented 4 years ago

Ah, don’t worry. :D

With your multi-arch suggestion, I guess it’s a good time now to start with #8 and maybe combine it with your PR or something. I start working on it.

rfgamaral commented 4 years ago
* have to update `run.sh` to check the availability of Docker inside the container

What do you mean? I don't think you need to do much...

* think about how to name the tags

My recommendation is to follow what I have done here: https://hub.docker.com/repository/docker/rfgamaral/traefik-certs-dumper/tags?page=1 (replace preview with latest or a version number).

kereis commented 4 years ago
* have to update `run.sh` to check the availability of Docker inside the container

Yeah, I figured you can check if the docker command exists via [ -x "$(command -v docker)" ]

* think about how to name the tags

My recommendation is to follow what I have done here: https://hub.docker.com/repository/docker/rfgamaral/traefik-certs-dumper/tags?page=1 (replace preview with latest or a version number).

Yep, looks fine. Also, we can prepend the version number and omit it for latest releases. I try to start working on it. 👍

kereis commented 4 years ago

Sorry that this took some time. I really like your suggestion of using GitHub Actions and how it works. Looks pretty neat. I cherry-picked your commit and modified it a little bit.

I also added the image variations docker and alpine. Best way to find out if the images work is to build them and check for errors. Maybe we can add another workflow or step for test-building the images.

rfgamaral commented 4 years ago

Looks good.

But I don't recommend custom actions like I originally did on my repo, makes it harder to maintain (although I haven't touched that code since I first added it). I believe there are third-party actions available in the marketplace that perhaps you could use to simplify the build process but I haven't personally looked much into that yet.

kereis commented 4 years ago

I probably have to merge this one as of GitHub, secrets cannot be passed to forked repositories.

rfgamaral commented 4 years ago

I probably have to merge this one as of GitHub, secrets cannot be passed to forked repositories.

You can always merge it and give the finishing touches on the develop branch until it's ready to be merged to master :)