1. Caddy version (caddy version
):
2.0.0
2. How I run Caddy:
I am attempting to run caddy under docker using the first example given on the Docker hub page. I have created a simple index.html
file and am trying to run the command listed to start but I receive the follow error before the container exits.
run: loading initial config: loading new config: starting caddy administration endpoint: listen tcp 192.168.1.65:2019: bind: cannot assign requested address
a. System environment:
Fedora 32, running docker with cgroups v2 disabled.
Docker version = 19.03.11
b. Command:
docker run --rm -p 80:80 -v $PWD/index.html:/usr/share/caddy/index.html -v caddy_data:/data caddy:2.0.0
c. Service/unit/compose file:
N/A
d. My complete Caddyfile or JSON config:
N/A: Using default Caddyfile
3. The problem I’m having:
When I try to run the Caddy container with the provided commands, the container exits after failing to bind the administration endpoint.
4. Error messages and/or full log output:
docker run --rm -p 80:80 -v $PWD/index.html:/usr/share/caddy/index.html -v caddy_data:/data caddy:2.0.0
{"level":"info","ts":1591213712.1576638,"msg":"using provided configuration","config_file":"/etc/caddy/Caddyfile","config_adapter":"caddyfile"}
run: loading initial config: loading new config: starting caddy administration endpoint: listen tcp 192.168.1.65:2019: bind: cannot assign requested address
5. What I already tried:
I’ve tried running the command in a couple different ways, running as sudo, mapping the port to 8080:80 but it looks like the issue is happening inside the container which I don’t understand.