caddy-docker-proxy icon indicating copy to clipboard operation
caddy-docker-proxy copied to clipboard

podman compatibility

Open unixfox opened this issue 5 years ago • 2 comments

Hello,

podman seems to have an API that emulate docker API: https://podman.io/blogs/2020/07/01/rest-versioning.html

and the API specification is here: https://docs.podman.io/en/latest/_static/api.html

I tried to run caddy-docker-proxy through the podman API but unfortunately it didn't work (as excepted):

root@podman:~# podman run --rm -ti -v /run/podman/podman.sock:/var/run/docker.sock:Z lucaslorentz/caddy-docker-proxy
2020/10/14 14:54:42 [INFO] Running caddy proxy server
2020/10/14 14:54:42.516	INFO	admin	admin endpoint started	{"address": "tcp/localhost:2019", "enforce_origin": false, "origins": ["localhost:2019", "[::1]:2019", "127.0.0.1:2019"]}
2020/10/14 14:54:42.518	INFO	autosaved config	{"file": "/config/caddy/autosave.json"}
2020/10/14 14:54:42 [INFO] Running caddy proxy controller
2020/10/14 14:54:42 [INFO] CaddyfilePath: 
2020/10/14 14:54:42 [INFO] LabelPrefix: caddy
2020/10/14 14:54:42 [INFO] PollingInterval: 30s
2020/10/14 14:54:42 [INFO] ProcessCaddyfile: true
2020/10/14 14:54:42 [INFO] ProxyServiceTasks: true
2020/10/14 14:54:42 [INFO] IngressNetworks: []
2020/10/14 14:54:42 [INFO] Caddy ContainerID: 9c9dcd5f8df1666607cc1f317beaa9459807013da49dc9ae4262d3b1dd43cf41
2020/10/14 14:54:42 [INFO] IngressNetworksMap: map[]
2020/10/14 14:54:42 EOF
2020/10/14 14:54:42 <nil>
2020/10/14 14:54:42 <nil>
2020/10/14 14:54:42 <nil>

I just wanted to know if it would be feasible to make it work with the current podman API or the API is not complete enough to the point that it could work with caddy-docker-proxy?

unixfox avatar Oct 14 '20 14:10 unixfox

With podman 3.0, which has a docker-compatible API, caddy fails with:

[INFO] Connecting to docker events
[ERROR] Docker events error: EOF

Reference article on how to use the docker-compatible API. I've also tested and it works with traefik (which also doesn't have any podman-specific compatibility) to make sure that this is not an issue with the socket.

ilya-zlobintsev avatar Mar 20 '21 18:03 ilya-zlobintsev

Is there a way to increase debug logging or get a trace at that log event?

westurner avatar May 24 '22 05:05 westurner

EOF error has been fixed in https://github.com/lucaslorentz/caddy-docker-proxy/pull/415 Use env variable CADDY_DOCKER_NO_SCOPE=true

lucaslorentz avatar Nov 23 '22 19:11 lucaslorentz