Fix extra warnings on masked volumes.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
parent
9f6a5a964a
commit
e1308a8329
2 changed files with 39 additions and 1 deletions
|
|
@ -963,7 +963,10 @@ def warn_on_masked_volume(volumes_option, container_volumes, service):
|
|||
for volume in container_volumes)
|
||||
|
||||
for volume in volumes_option:
|
||||
if container_volumes.get(volume.internal) != volume.external:
|
||||
if (
|
||||
volume.internal in container_volumes and
|
||||
container_volumes.get(volume.internal) != volume.external
|
||||
):
|
||||
log.warn((
|
||||
"Service \"{service}\" is using volume \"{volume}\" from the "
|
||||
"previous container. Host mapping \"{host_path}\" has no effect. "
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue