You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
portainer/api/datastore/migrator/migrate_dbversion100.go

26 lines
492 B

package migrator
import (
"os"
"github.com/rs/zerolog/log"
)
func (m *Migrator) migrateDockerDesktopExtentionSetting() error {
log.Info().Msg("updating docker desktop extention flag in settings")
isDDExtension := false
if _, ok := os.LookupEnv("DOCKER_EXTENSION"); ok {
isDDExtension = true
}
settings, err := m.settingsService.Settings()
if err != nil {
return err
}
settings.IsDockerDesktopExtension = isDDExtension
return m.settingsService.UpdateSettings(settings)
}