docker compose fix volumes.

This commit is contained in:
Miroslav Šedivý
2023-10-03 19:32:40 +02:00
parent 4b458a6342
commit 112e57539d
+2 -10
View File
@@ -203,16 +203,8 @@ func (manager *RoomManagerCtx) ExportAsDockerCompose() ([]byte, error) {
} }
// volumes // volumes
volumes := []string{} if len(containerJson.HostConfig.Binds) > 0 {
for _, mount := range containerJson.HostConfig.Mounts { service["volumes"] = containerJson.HostConfig.Binds
if mount.ReadOnly {
volumes = append(volumes, fmt.Sprintf("%s:%s:ro", mount.Source, mount.Target))
} else {
volumes = append(volumes, fmt.Sprintf("%s:%s", mount.Source, mount.Target))
}
}
if len(volumes) > 0 {
service["volumes"] = volumes
} }
// devices // devices