mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-18 22:22:59 +08:00
fix: 解决容器镜像加速或仓库空行导致 Docker 无法正常启用的问题 (#1437)
This commit is contained in:
parent
d8d2ee0f46
commit
7546391c17
@ -136,12 +136,14 @@ func (u *DockerService) UpdateConf(req dto.SettingUpdate) error {
|
||||
|
||||
switch req.Key {
|
||||
case "Registries":
|
||||
req.Value = strings.TrimRight(req.Value, ",")
|
||||
if len(req.Value) == 0 {
|
||||
delete(daemonMap, "insecure-registries")
|
||||
} else {
|
||||
daemonMap["insecure-registries"] = strings.Split(req.Value, ",")
|
||||
}
|
||||
case "Mirrors":
|
||||
req.Value = strings.TrimRight(req.Value, ",")
|
||||
if len(req.Value) == 0 {
|
||||
delete(daemonMap, "registry-mirrors")
|
||||
} else {
|
||||
|
@ -18,13 +18,13 @@
|
||||
:stroke-width="12"
|
||||
:percentage="uploadPrecent"
|
||||
></el-progress>
|
||||
<div v-if="type === 'mysql'" class="el-upload__tip">
|
||||
<div v-if="type === 'mysql'" style="width: 80%" class="el-upload__tip">
|
||||
<span class="input-help">{{ $t('database.supportUpType') }}</span>
|
||||
<span class="input-help">
|
||||
{{ $t('database.zipFormat') }}
|
||||
</span>
|
||||
</div>
|
||||
<div v-else class="el-upload__tip">
|
||||
<div v-else style="width: 80%" class="el-upload__tip">
|
||||
<span class="input-help">{{ $t('website.supportUpType') }}</span>
|
||||
<span class="input-help">
|
||||
{{ $t('website.zipFormat', [type + '.json']) }}
|
||||
|
Loading…
Reference in New Issue
Block a user