mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-10-29 18:26:03 +08:00
fix(container): Fix the problem that a container cannot create a read… (#8095)
Refs #8074
This commit is contained in:
parent
05f72e9dcf
commit
766beae4e1
1 changed files with 4 additions and 3 deletions
|
|
@ -1195,9 +1195,10 @@ func loadConfigInfo(isCreate bool, req dto.ContainerOperate, oldContainer *types
|
|||
for _, volume := range req.Volumes {
|
||||
if volume.Type == "volume" {
|
||||
hostConf.Mounts = append(hostConf.Mounts, mount.Mount{
|
||||
Type: mount.Type(volume.Type),
|
||||
Source: volume.SourceDir,
|
||||
Target: volume.ContainerDir,
|
||||
Type: mount.Type(volume.Type),
|
||||
Source: volume.SourceDir,
|
||||
Target: volume.ContainerDir,
|
||||
ReadOnly: volume.Mode == "ro",
|
||||
})
|
||||
config.Volumes[volume.ContainerDir] = struct{}{}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue