ldez/traefik-certs-dumper

Unknown Operand

falco1717 opened this issue · 1 comments

I get the following error when running the docker container.

 ✔ Container tactical-rmm-traefik-certs-dumper-1  Recreated                                                                                                                            10.5s 
Attaching to traefik-certs-dumper
traefik-certs-dumper  | fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/APKINDEX.tar.gz
traefik-certs-dumper  | fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/community/x86_64/APKINDEX.tar.gz
traefik-certs-dumper  | (1/2) Installing oniguruma (6.9.7.1-r0)
traefik-certs-dumper  | (2/2) Installing jq (1.6-r1)
traefik-certs-dumper  | Executing busybox-1.34.1-r3.trigger
traefik-certs-dumper  | OK: 7 MiB in 16 packages
traefik-certs-dumper  | sh: 0: unknown operand
traefik-certs-dumper  | sh: 0: unknown operand
traefik-certs-dumper  | sh: 0: unknown operand

Fixed it I had to modify the compose file a little.

Original Version

version: "3.7"
services:
##Copy the acme.json of Traefik2 at volumes: (userdir/docker/rmm in this case)
  traefik-certs-dumper:
    image: ldez/traefik-certs-dumper:v2.7.4
    entrypoint: sh -c '
      apk add jq
      ; while ! [ -e /data/acme.json ]
      || ! [ `jq ".[] | .Certificates | length" /data/acme.json` != 0 ]; do
      sleep 1
      ; done
      && traefik-certs-dumper file --version v2 --watch
      --source /data/acme.json --dest data/certs'
    volumes:
      - $USERDIR/docker/rmm:/data

New Version

version: "3.7"
services:
##Copy the acme.json of Traefik2 at volumes: (userdir/docker/rmm in this case)
  traefik-certs-dumper:
    image: ldez/traefik-certs-dumper:v2.7.4
    entrypoint: sh -c '
      apk add jq
      && traefik-certs-dumper file --version v2 --watch
      --source /data/acme.json --dest data/certs'
    volumes:
      - $USERDIR/docker/rmm:/data