From 5be69fc0934c50e09c19f6a609985286d8e8d6a4 Mon Sep 17 00:00:00 2001 From: Janet Kuo Date: Tue, 2 Aug 2016 15:38:04 -0700 Subject: [PATCH] Volumes default not read-only --- cli/app/app.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cli/app/app.go b/cli/app/app.go index fde789dc..bfb5cc9c 100644 --- a/cli/app/app.go +++ b/cli/app/app.go @@ -515,12 +515,12 @@ func configVolumes(service ServiceConfig) ([]api.VolumeMount, []api.Volume) { containerDir := volume[strings.Index(volume, character)+1:] containerDir = strings.TrimSpace(containerDir) - // check if ro/rw mode is defined - readonly := true + // check if ro/rw mode is defined, default rw + readonly := false if strings.Index(volume, character) != strings.LastIndex(volume, character) { mode := volume[strings.LastIndex(volume, character)+1:] - if strings.Compare(mode, "rw") == 0 { - readonly = false + if strings.Compare(mode, "ro") == 0 { + readonly = true } containerDir = containerDir[0:strings.Index(containerDir, character)] }