From 4b1b32dd62a62b9de55c34cfe2be8ee30c53ff62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Sun, 1 Oct 2023 23:39:35 +0200 Subject: [PATCH] fix docker compose volumes readonly. --- internal/room/manager.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/room/manager.go b/internal/room/manager.go index 10d1edf..48df8d5 100644 --- a/internal/room/manager.go +++ b/internal/room/manager.go @@ -205,11 +205,11 @@ func (manager *RoomManagerCtx) ExportAsDockerCompose() ([]byte, error) { // volumes volumes := []string{} - for _, mount := range containerJson.Mounts { - if mount.RW { - volumes = append(volumes, fmt.Sprintf("%s:%s:ro", mount.Source, mount.Destination)) + for _, mount := range containerJson.HostConfig.Mounts { + 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.Destination)) + volumes = append(volumes, fmt.Sprintf("%s:%s", mount.Source, mount.Target)) } } if len(volumes) > 0 {