func (s *ContainerStatus) Restarting() bool {
	return s.Exists() && s.Status == "restarting"
}
Restarting returns true, if container is restarting in a loop, based on ContainerStatus.
package types
type ContainerConfig struct {
	Name string `json:"name"`
	Image string `json:"image"`
	Args []string `json:"args,omitempty"`
	Entrypoint []string `json:"entrypoint,omitempty"`
	Ports []PortMap `json:"ports,omitempty"`
	Mounts []Mount `json:"mounts,omitempty"`
	Privileged bool `json:"privileged,omitempty"`
	NetworkMode string `json:"networkMode,omitempty"`
	PidMode string `json:"pidMode,omitempty"`
	IpcMode string `json:"ipcMode,omitempty"`
	User string `json:"user,omitempty"`
	Group string `json:"group,omitempty"`
	Env map[string]string `json:"env,omitempty"`
}
type ContainerStatus struct {
	ID string `json:"id,omitempty"`
	Status string `json:"status,omitempty"`
}
type PortMap struct {
	IP string `json:"ip"`
	Port int `json:"port"`
	Protocol string `json:"protocol"`
}
type Mount struct {
	Source string `json:"source"`
	Target string `json:"target"`
	Propagation string `json:"propagation,omitempty"`
}
type File struct {
	Path string `json:"path"`
	Content string `json:"content"`
	Mode int64 `json:"mode"`
	User string `json:"uid"`
	Group string `json:"gid"`
}
func (s *ContainerStatus) Exists() bool {
	return s.ID != ""
}
func (s *ContainerStatus) Running() bool {
	return s.Exists() && s.Status == "running"
}