docker: no default Caddyfile provided
When running docker compose up
in devops/docker
(after commenting out network: host
as described in #412), I get a new error:
Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/../haskell-gargantext/devops/docker/Caddyfile" to rootfs at "/etc/caddy/Caddyfile": mount /../haskell-gargantext/devops/docker/Caddyfile:/etc/caddy/Caddyfile (via /proc/self/fd/6), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
This was caused because docker
automatically created a folder devops/docker/Caddyfile/
which can now not be mapped onto the file /etc/caddy/Caddyfile
in the container. Replacing the devops/docker/Caddyfile/
folder with an empty Caddyfile
file, makes the docker start, but it now fails with
caddy-1 | {"level":"info","ts":1728376681.1437418,"msg":"using config from file","file":"/etc/caddy/Caddyfile"}
caddy-1 | Error: adapting config using caddyfile: EOF
caddy-1 exited with code 1
Possible solution
Add a default Caddyfile
.
Version information
docker --version
output: Docker version 27.2.0, build 3ab4256
. Debian Bookworm.