diff --git a/components/supervisor/pkg/supervisor/supervisor.go b/components/supervisor/pkg/supervisor/supervisor.go index 8740f4a95ec5ea..272bfb251a12db 100644 --- a/components/supervisor/pkg/supervisor/supervisor.go +++ b/components/supervisor/pkg/supervisor/supervisor.go @@ -1128,7 +1128,14 @@ func socketActivationForDocker(ctx context.Context, wg *sync.WaitGroup, term *te l, err := net.Listen("unix", fn) if err != nil { log.WithError(err).Error("cannot provide Docker activation socket") + return } + + go func() { + <-ctx.Done() + l.Close() + }() + _ = os.Chown(fn, gitpodUID, gitpodGID) err = activation.Listen(ctx, l, func(socketFD *os.File) error { cmd := exec.Command("docker-up")