mirror of
https://github.com/docker/compose.git
synced 2025-07-08 22:34:26 +02:00
Update error message when external volume is missing
Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
parent
f774422d18
commit
8616b2de51
@ -238,15 +238,18 @@ class Project(object):
|
|||||||
try:
|
try:
|
||||||
for volume in self.volumes:
|
for volume in self.volumes:
|
||||||
if volume.external:
|
if volume.external:
|
||||||
log.info(
|
log.debug(
|
||||||
'Volume {0} declared as external. No new '
|
'Volume {0} declared as external. No new '
|
||||||
'volume will be created.'.format(volume.name)
|
'volume will be created.'.format(volume.name)
|
||||||
)
|
)
|
||||||
if not volume.exists():
|
if not volume.exists():
|
||||||
raise ConfigurationError(
|
raise ConfigurationError(
|
||||||
'Volume {0} declared as external, but could not be'
|
'Volume {name} declared as external, but could'
|
||||||
' found. Please create the volume manually and try'
|
' not be found. Please create the volume manually'
|
||||||
' again.'.format(volume.full_name)
|
' using `{command}{name}` and try again.'.format(
|
||||||
|
name=volume.full_name,
|
||||||
|
command='docker volume create --name='
|
||||||
|
)
|
||||||
)
|
)
|
||||||
continue
|
continue
|
||||||
volume.create()
|
volume.create()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user