1. My Caddy version (caddy version
):
Latest official Docker container
2. How I run Caddy:
docker create --name=caddy2 -e TZ=America/Chicago -p 90:90 -p 4444:443 -e PUID=1000 -e PGID=1000 -v C:\Users\user\Documents\Docker\caddy2\logs:/logs -v C:\Users\user\Documents\Docker\caddy2\caddyfile\CaddyFile:/etc/caddy/Caddyfile -v C:\Users\user\Documents\Docker\caddy2\data:/data -v C:\Users\user\Documents\Docker\caddy2\config:/config/caddy caddy:latest
Docker start caddy
(I am using different ports as I have Caddy V1 running in production. Just trying to get Caddyfile for V2 working at this point.)
a. System environment:
Docker version 19.03.8 on Windows 10.0.18363.778
b. Command:
N/A
c. Service/unit/compose file:
N/A
d. My complete Caddyfile or JSON config:
3. The problem I’m having:
The docker container is not picking up changes made to the Caddyfile being mounted form the host OS.
4. Error messages and/or full log output:
I know what is causing the issues in my CaddyfIle and have already updated it. Just need Caddy now to read the updated file immediately and not several hours later.
{“level”:“info”,“ts”:1588250263.18323,“msg”:“using provided configuration”,“config_file”:"/etc/caddy/Caddyfile",“config_adapter”:“caddyfile”}
run: adapting config using caddyfile: /etc/caddy/Caddyfile:11: unrecognized directive: errors
5. What I already tried:
I have tried stopping and starting the container. I have removed and recreated the container. I have removed the container image and re-downloaded it. If I remove the container, the image, wait several hours, and try again, it then picks up the changes I made to Caddyfile 8 hours ago.
I would tend to think this is a Docker issue with its local cache, but I run 30+ different containers and do this all the time without issues on all of them, except this one
I tried this also, “docker exec caddy2 caddy reload --config /etc/caddy/Caddyfile --adapter caddyfile”, but since the container crashes, it is not able to run on a stopped container.