I apologize for the generic title, I am not sure how to properly describe my issue.
I've followed the docker compose guide from https://hub.docker.com/_/caddy and prepared the docker-file below:
It describes that I need to create my own data volume, so I proceed by creating one: docker volume create caddy_caddy_data
But as I run the command docker compose up -d, I get this error message below:
_Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/home/username_here/docker/caddy/Caddyfile" to rootfs at "/etc/caddy/Caddyfile": mount /home/usernamehere/docker/caddy/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
Am I doing something wrong? I get the same error if I skip creating a data volume and remove external: true from the volumes section. The Caddyfile folder is created as soon as I run the docker compose command, as described in the error message. I don't know if it's the intended behavior, so I don't understand what's the issue here.
I apologize for the generic title, I am not sure how to properly describe my issue. I've followed the docker compose guide from
https://hub.docker.com/_/caddy
and prepared the docker-file below:It describes that I need to create my own data volume, so I proceed by creating one:
docker volume create caddy_caddy_data
But as I run the command
docker compose up -d
, I get this error message below:_Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/home/username_here/docker/caddy/Caddyfile" to rootfs at "/etc/caddy/Caddyfile": mount /home/usernamehere/docker/caddy/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
Am I doing something wrong? I get the same error if I skip creating a data volume and remove
external: true
from the volumes section. The Caddyfile folder is created as soon as I run the docker compose command, as described in the error message. I don't know if it's the intended behavior, so I don't understand what's the issue here.Thank you in advance for any help.