diff --git a/compose/config/types.py b/compose/config/types.py index 811e6c1fc..f4d2c26d9 100644 --- a/compose/config/types.py +++ b/compose/config/types.py @@ -203,7 +203,8 @@ class VolumeSpec(namedtuple('_VolumeSpec', 'external internal mode')): def repr(self): external = self.external + ':' if self.external else '' - return '{ext}{v.internal}:{v.mode}'.format(ext=external, v=self) + mode = ':' + self.mode if self.external else '' + return '{ext}{v.internal}{mode}'.format(mode=mode, ext=external, v=self) @property def is_named_volume(self): diff --git a/tests/acceptance/cli_test.py b/tests/acceptance/cli_test.py old mode 100755 new mode 100644 index 7cc5adb92..115dc6439 --- a/tests/acceptance/cli_test.py +++ b/tests/acceptance/cli_test.py @@ -299,7 +299,7 @@ class CLITestCase(DockerClientTestCase): }, 'volume': { 'image': 'busybox', - 'volumes': ['/data:rw'], + 'volumes': ['/data'], 'network_mode': 'bridge', }, 'app': {