Mnaged to get over that. So adding a Dockerfile as per you example then the following in the compose:
caddy:
container_name: caddy
build:
dockerfile: ${PWD}/caddy/Dockerfile
context: ${PWD}/caddy
I ned to verify if the ${PWD} does anything, I cheated and put the full path. But this built the image an dused it with the cloudflare plugin.
So next step is understanding how to use it.
Current caddyfile has a tls section which told it my meail address and how to pull from cloudflare.
But now it seems to waht a special challenge field. But it doesn’t quite tell me where it should go:
{
"challenges": {
"dns": {
"provider": "cloudflare",
"api_token": "secret"
}
}
}
Source: Caddy2 cloudflare plugin - #3 by Dejan_Milosevic but all the links are bad.