Hi,
I'm trying use the Docker TLS Challenge but keeps giving this error:
level=error msg="Unable to obtain ACME certificate for domains "whoami-traefik-docker": unable to generate a certificate for the domains [whoami-traefik-docker]: acme: error: 400 :: POST :: https://acme-staging-v02.api.letsencrypt.org/acme/new-order :: urn:ietf:params:acme:error:rejectedIdentifier :: Error creating new order :: Cannot issue for "whoami-traefik-docker": Domain name needs at least one dot, url: " routerName=whoami-service@docker rule="Host(
whoami-traefik-docker
)" providerName=le.acme
unable to generate a certificate for the domains [whoami-traefik-docker]
Where comes the whoami-traefik.docker?
The domain name in the error is not supposed to be the name insert in Host(mydomain.com
)?
Independent of domain I insert we keep showing the same error. Any Idea what I'm missing?
My docker-compose.yml:
version: "3.3"
services:
traefik:
image: "traefik:v2.2"
container_name: "traefik"
command:
- "--log.level=INFO"
- "--api.insecure=true" # Dont do in production
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.websecure.address=:443"
# LetsEncrypt
- "--certificatesresolvers.le.acme.email=renatopinheiro@motorline.pt"
- "--certificatesresolvers.le.acme.storage=/letsencrypt/acme.json"
- "--certificatesresolvers.le.acme.tlschallenge=true"
# DEBUG CA server - uncomment for testing
- "--certificatesresolvers.le.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory"
ports:
- 443:443
- 8080:8080
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "./letsencrypt:/letsencrypt"
whoami:
image: "containous/whoami"
container_name: "whoami"
labels:
- "traefik.enable=true"
- "traefik.http.routers.whoami-secure.entrypoints=websecure"
- "traefik.http.routers.whoami-secure.rule=Host(`mydomain.com`)"
- "traefik.http.routers.whoami-service.tls.certresolver=le"
Best regards,
Renato Pinheiro