Tried to create a Caddy container by running:
$docker run -d -v $(pwd)/Caddyfile:/etc/Caddyfile --name=caddy --network=wordpress -p 8443:8443 abiosoft/caddy
It spits out this error:
Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused “process_linux.go:402: container init caused "rootfs_linux.go:58: mounting \"/home/bill/webwork/mission/Caddyfile\" to rootfs \"/var/lib/docker/overlay2/3937f287a3f13e8ae95dff03a51fce4390765b1b08a989dc9b1392f20a007049/merged\" at \"/var/lib/docker/overlay2/3937f287a3f13e8ae95dff03a51fce4390765b1b08a989dc9b1392f20a007049/merged/etc/Caddyfile\" caused \"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.
I had a Wordpress container and figured it was possible that the php-fpm container may have a conflicting path. I removed it and still get the same error. Then, after reading another post on here felt it was possible that the path was going to a folder and not the Caddyfile. When I tried to re-run it assuming so, it created another Caddyfile folder, but it did not contain a Caddyfile, which I think may be what my real problem is.
I apologize in advance. Both Caddy and Docker are new to me. I was running Vagrant for my local work before, but felt this was the direction I should take my setup after seeing Matt Holt’s comments on a Youtube video from Chrome Devs about using Wordpress as a PWA. Thanks for taking a look.