Unfortunately I have another question. I hope that you can help me here too.
I'm trying to create a shell script for dnsChallenge all day because my DNS provider is not supported.
My traefik.toml part:
[entryPoints]
[entryPoints.http]
address = ":80"
[entryPoints.https]
address = ":443"
.......
[certificatesResolvers.http.acme]
email = "my@mail.tld"
storage = "acme.json"
caServer = "https://acme-staging-v02.api.letsencrypt.org/directory"
[certificatesResolvers.http.acme.dnsChallenge]
provider = "exec"
My docker-compose.yml part
labels:
- "traefik.http.routers.traefik-secure.middlewares=traefik-auth"
- "traefik.http.routers.traefik-secure.service=api@internal"
- "traefik.http.routers.traefik-secure.entrypoints=https"
- "traefik.http.routers.traefik-secure.rule=Host(`${TRAEFIK_URL}`)"
- "traefik.http.routers.traefik-secure.tls=true"
- "traefik.http.routers.traefik-secure.tls.certresolver=http"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./traefik.toml:/traefik.toml:ro
- /dns.sh:/etc/traefik/dns.sh
environment:
- "EXEC_PATH=/etc/traefik/dns.sh"
In my dns.sh I currently have only one output of all parameters to an temote URL because I don't know with which parameters the file is called
The error
time="2020-09-04T17:15:20+02:00" level=info msg="Configuration loaded from file: /traefik.toml"
time="2020-09-04T17:15:25+02:00" level=error msg="Unable to obtain ACME certificate for domains \"www.mydomain.tld\": unable to generate a certificate for the domains [www.mydomain.tld]: error: one or more domains had a problem:\n[www.mydomain.tld] [www.mydomain.tld] acme: error presenting token: fork/exec /etc/traefik/dns.sh: exec format error\n" routerName=traefik-secure@docker rule="Host(`www.mydomain.tld`)" providerName=http.acme
When I connect to the container with docker exec and run the dns.sh it works