Skip to content

Commit bd7818f

Browse files
author
Jake Gealer
committed
fix random bug
Podman seems to fall into this bug in some situations and produce an EOF. This obviously isn't ideal, so this fixes that.
1 parent 5f66979 commit bd7818f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,7 @@ CADDY_DOCKER_MODE=<string>
521521
CADDY_DOCKER_POLLING_INTERVAL=<duration>
522522
CADDY_DOCKER_PROCESS_CADDYFILE=<bool>
523523
CADDY_DOCKER_PROXY_SERVICE_TASKS=<bool>
524+
DOCKER_NO_SCOPE=<bool, default scope used>
524525
```
525526
526527
Check **examples** folder to see how to set them on a Docker Compose file.

loader.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,11 @@ func (dockerLoader *DockerLoader) monitorEvents() {
168168

169169
func (dockerLoader *DockerLoader) listenEvents() {
170170
args := filters.NewArgs()
171-
args.Add("scope", "swarm")
172-
args.Add("scope", "local")
171+
if !isTrue.MatchString(os.Getenv("DOCKER_NO_SCOPE")) {
172+
// This env var is useful for Podman where in some instances the scope can cause some issues.
173+
args.Add("scope", "swarm")
174+
args.Add("scope", "local")
175+
}
173176
args.Add("type", "service")
174177
args.Add("type", "container")
175178
args.Add("type", "config")

0 commit comments

Comments
 (0)