Skip to content

Commit

Permalink
修复文件管理加载了远程镜像
Browse files Browse the repository at this point in the history
  • Loading branch information
donknap committed Oct 30, 2024
1 parent b57a02e commit 1a20e65
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 2 additions & 0 deletions asset/plugin/backup/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ services:
image: dpanel/explorer
container_name: dpanel-plugin-backup
restart: no
labels:
- "com.dpanel.container.title=dpanel 备份助手"
command:
#{{- range $key, $val := .backup.Command }}
- {{ $val | unescaped }}
Expand Down
2 changes: 2 additions & 0 deletions asset/plugin/explorer/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ services:
restart: always
privileged: true
pid: host
labels:
- "com.dpanel.container.title=dpanel 文件管理助手"
x-dpanel-service:
image_tar:
amd64: asset/plugin/explorer/image-amd64.tar
Expand Down
9 changes: 0 additions & 9 deletions common/service/docker/container-create.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ type ContainerCreateBuilder struct {
func (self *ContainerCreateBuilder) WithContainerName(name string) *ContainerCreateBuilder {
self.containerConfig.Hostname = fmt.Sprintf("%s.pod.dpanel.local", name)
self.containerName = name
self.containerConfig.Labels = map[string]string{
"BuildAuthor": BuilderAuthor,
"BuildDesc": BuildDesc,
"BuildWebSite": BuildWebSite,
"buildVersion": BuildVersion,
}
// 防止退出
self.containerConfig.AttachStdin = true
self.containerConfig.AttachStdout = true
Expand Down Expand Up @@ -224,9 +218,6 @@ func (self *ContainerCreateBuilder) WithDns(ip []string) {
}

func (self *ContainerCreateBuilder) WithLabel(name, value string) {
if self.containerConfig.Labels == nil {
self.containerConfig.Labels = make(map[string]string)
}
self.containerConfig.Labels[name] = value
}

Expand Down
5 changes: 5 additions & 0 deletions common/service/docker/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ func (self Builder) GetContainerCreateBuilder() *ContainerCreateBuilder {
builder := &ContainerCreateBuilder{
containerConfig: &container.Config{
ExposedPorts: make(nat.PortSet),
Labels: map[string]string{
"maintainer": BuilderAuthor,
"com.dpanel.description": BuildDesc,
"com.dpanel.website": BuildWebSite,
},
},
hostConfig: &container.HostConfig{
PortBindings: make(nat.PortMap),
Expand Down

0 comments on commit 1a20e65

Please sign in to comment.