diff --git a/pods/manager.go b/pods/manager.go index 7925d4c..bb7b5c2 100644 --- a/pods/manager.go +++ b/pods/manager.go @@ -41,15 +41,19 @@ func ConnectSocket() { } func PullImage() error { - log.Println("Downloading Container image ", viper.GetString("image")) - image := viper.GetString("image") - conn := Socket - _, err := images.Pull(conn, image, nil) - if err != nil { - log.Println(err) - return err + for { + log.Println("Downloading Container image ", viper.GetString("image")) + image := viper.GetString("image") + conn := Socket + _, err := images.Pull(conn, image, nil) + if err != nil { + log.Println(err) + return err + } + + time.Sleep(1 * time.Hour) } - return nil + } // Cleanup deletes Containers older than the specified maximum Age (Equal to session cookie maximum age)