Problema con Caddy, Docker y Letsencrypt Staging

I need to configure caddy staging in a project with docker

I have the following caddy configuration in production.yml:

      caddy:
    build:
      context: .
      dockerfile: ./compose/production/caddy/Dockerfile
    image: demo_production_caddy
    depends_on:
      - django
    volumes:
      - production_caddy:/home/demo/.caddy
    env_file:
      - ./.envs/.production/.caddy
    ports:
      - "0.0.0.0:80:80"
      - "0.0.0.0:443:443"

My caddyFile

    my-domain.com www.my-domain.com {
    proxy / django:5000 {
        transparent
    }
    tls [email protected] {
        ca https://acme-staging-v02.api.letsencrypt.org/directory
    }

Caddy’s response:

caddy_1         | 2020/02/09 14:14:29 [INFO][my-domain.com] acme: Obtaining bundled SAN certificate

caddy_1         | 2020/02/09 14:14:30 [INFO][my-domain.com] AuthURL: https://acme-staging-v02.api.letsencrypt.org/acme/authz-v3/38002395

caddy_1         | 2020/02/09 14:14:30 [] failed to get certificate: acme: Error 405 - urn:ietf:params:acme:error:malformed - Method not allowed

caddy_1         | exit status 1

demo_caddy_1 exited with code 1

Does anyone know what the problem is?

Source: StackOverflow