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

Docker command is not available. Restart container functionality will not work! #35

Closed bartagergely closed 3 years ago

bartagergely commented 3 years ago

Container restart worked before, now I got the following error:

[2021-03-12T21:34:45+0000]: Docker command is not available. Restart container functionality will not work!
[2021-03-12T21:34:45+0000]: In case you need it, consider using the Docker version of this image.
[2021-03-12T21:34:45+0000]: (e.g.: humenius/traefik-certs-dumper:latest)

Here is my compose file:

    certdumper:
        image: humenius/traefik-certs-dumper
        container_name: traefik_certdumper
        network_mode: none
        command: --restart-containers mailcowdockerized_postfix-mailcow_1,mailcowdockerized_dovecot-mailcow_1,mailcowdockerized_nginx-mailcow_1
        volumes:
          - /docker/traefik/acme:/traefik:ro
          - ./data/assets/ssl/:/output:rw
          - /var/run/docker.sock:/var/run/docker.sock:ro
        environment:
          - DOMAIN=mail.doesntmatter.com

What can cause this issue?

kereis commented 3 years ago

Hi,

did you check if the containers were still restarted? I'll look after it too.

bartagergely commented 3 years ago

I got this error every time I start this (certdumper) container, not when the restart is needed. The certificates are still valid in my acme.json until this May. If you can help me how to force the certdumper to restart the containers even if the certificate is still valid, then please let me know and I will try it.

kereis commented 3 years ago

Unfortunately, there is no way of force restarting containers via this image - either way, the script assumes that there is no Docker command available for some reason, thus assuming having no Docker installed and disabling the script's Docker functionalities.

I suspect that the issue arises at that check.

I'm sorry to hear about you having tho experience that issue. I suggest switching to an older version if possible in the meantime until the issue is resolved.

kereis commented 3 years ago

Okay, I looked further into this and found out that for some reason, the wrong OS is used for the default (Docker) image - In this case Alpine Linux. So it could be I messed something up in GitHub Workflow.

EDIT: Yep, that's the case. I'm sorry that it slipped through. I'll fix it now.

kereis commented 3 years ago

I remove version 1.4.0 from Docker Hub and GitHub for now to avoid confusion and release version 1.4.1 to fix this issue.