1. The problem I’m having:
I created an issue in the github repo but was locked out of it. I’ve tried to recreate the problem without any real logic. It’s potentially a docker or linux permissions issue but I’ve had so much trouble with the Caddyfile itself in linux that I thought starting here was a good idea. I originally discovered the error within a github action, so I can add a minimum example of that to the repo as well if that was useful.ls
Original Issue:
Way to reproduce:
A significantly harder to follow/with more logic version of the issue can be found here, and is where the github action error messages come from for now:
2. Error messages and/or full log output:
wsl:
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 "/run/desktop/mnt/host/wsl/docker-desktop-bind-mounts/Ubuntu/c98fe09064aae913ca993f3abd2c8fdf9674315eb4ae608f553688660e9d55d0" to rootfs at "/etc/caddy/Caddyfile": mount /run/desktop/mnt/host/wsl/docker-desktop-bind-mounts/Ubuntu/c98fe09064aae913ca993f3abd2c8fdf9674315eb4ae608f553688660e9d55d0:/etc/caddy/Caddyfile (via /proc/self/fd/14), 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
github actions:
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 "/__w/nvim_base/nvim_base/nvim_base/deploy-sourcegraph-docker/caddy/builtins/http.Caddyfile" to rootfs at "/etc/caddy/Caddyfile": mount /__w/nvim_base/nvim_base/nvim_base/deploy-sourcegraph-docker/caddy/builtins/http.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
3. Caddy version:
2.7-alpine
sha256:57942bf7e71d78bc866cbc6c45f0563dbbea73efedac5e731b4b2cffa75e45b4
4. How I installed and ran Caddy:
https://dl.cloudsmith.io/public/caddy/stable/deb/debian
a. System environment:
Ubuntu 22.04 Image in Github Ubuntu 22.04 Runner / WSL
b. Command:
https://github.com/david-engelmann/caddy_baddy
just run
docker compose -f docker-compose.yml up
c. Service/unit/compose file:
https://github.com/david-engelmann/caddy_baddy
The docker inside will be installed for you, it use docker compose, externally and internally
d. My complete Caddy config:
# Routes all plain http requests to sourcegraph-frontend - suitable for local testing.
#
# Caddyfile documentation: https://caddyserver.com/docs/caddyfile
:80
# Add the reverse proxies IPs (or IP CIDR ranges) to the trusted_proxies list.
# More information in https://caddyserver.com/docs/caddyfile/directives/reverse_proxy
reverse_proxy {
to {$SRC_FRONTEND_ADDRESSES}
trusted_proxies 0.0.0.0/0
}
If I’m totally barking up the wrong tree or the test logic is unsound, I apologize in advance.