I’ve been maintaining my own Docker image to run Caddy with Hugo, and I originally based the Dockerfile on abiosoft’s excellent example. I recently noticed that he modified it to run as an unprivileged user, so I included that functionality in my own.
Since I’m running Caddy in Docker, it made sense to me to log directly to stdout with log stdout
, but when I start everything up, I get:
2016/09/08 17:10:28 open log: permission denied
What’s odd is that I can run it with a shell (--entrypoint=/bin/sh
), and this works just fine:
echo OUT >/dev/stdout OUT
Here’s my repo, which includes the Dockerfile and the example Caddyfile config: