1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-21 21:33:18 +01:00

fix: fixes an edge case where a container might get stuck in created state (#3338)

This commit is contained in:
Amir Raminfar
2024-10-21 13:14:50 -07:00
committed by GitHub
parent 4026e927f5
commit f3ab541ad1
4 changed files with 48 additions and 26 deletions

18
internal/web/debug.go Normal file
View File

@@ -0,0 +1,18 @@
package web
import (
"encoding/json"
"net/http"
)
func (h *handler) debugStore(w http.ResponseWriter, r *http.Request) {
respone := make(map[string]interface{})
respone["hosts"] = h.multiHostService.Hosts()
containers, errors := h.multiHostService.ListAllContainers()
respone["containers"] = containers
respone["errors"] = errors
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(http.StatusOK)
json.NewEncoder(w).Encode(respone)
}