fix(boot): do not clean up temp container if not in docker

This commit is contained in:
Jacky 2025-05-04 01:10:17 +00:00
parent 02da74a5a1
commit 5b8b3d17c2
No known key found for this signature in database
GPG key ID: 215C21B10DF38B4D

View file

@ -13,6 +13,7 @@ import (
"github.com/0xJacky/Nginx-UI/internal/cluster"
"github.com/0xJacky/Nginx-UI/internal/cron"
"github.com/0xJacky/Nginx-UI/internal/docker"
"github.com/0xJacky/Nginx-UI/internal/helper"
"github.com/0xJacky/Nginx-UI/internal/mcp"
"github.com/0xJacky/Nginx-UI/internal/passkey"
"github.com/0xJacky/Nginx-UI/internal/validation"
@ -136,6 +137,9 @@ func InitJsExtensionType() {
// CheckAndCleanupOTAContainers Check and cleanup OTA update temporary containers
func CheckAndCleanupOTAContainers() {
if !helper.InNginxUIOfficialDocker() {
return
}
// Execute the third step cleanup operation at startup
err := docker.UpgradeStepThree()
if err != nil {