mirror of
https://github.com/m1k1o/neko-rooms.git
synced 2026-11-02 22:51:34 -06:00
fix docker compose volumes readonly.
This commit is contained in:
@@ -205,11 +205,11 @@ func (manager *RoomManagerCtx) ExportAsDockerCompose() ([]byte, error) {
|
|||||||
|
|
||||||
// volumes
|
// volumes
|
||||||
volumes := []string{}
|
volumes := []string{}
|
||||||
for _, mount := range containerJson.Mounts {
|
for _, mount := range containerJson.HostConfig.Mounts {
|
||||||
if mount.RW {
|
if mount.ReadOnly {
|
||||||
volumes = append(volumes, fmt.Sprintf("%s:%s:ro", mount.Source, mount.Destination))
|
volumes = append(volumes, fmt.Sprintf("%s:%s:ro", mount.Source, mount.Target))
|
||||||
} else {
|
} 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 {
|
if len(volumes) > 0 {
|
||||||
|
|||||||
Reference in New Issue
Block a user