Support "Long Syntax" for volumes.
This commit is contained in:
parent
78c83037ee
commit
1b9e7782e0
1 changed files with 7 additions and 1 deletions
|
@ -306,7 +306,13 @@ function makeVerticesAndEdges(Graph $graph, array $services, array $volumes, arr
|
|||
$serviceVolumes = [];
|
||||
|
||||
foreach ($definition['volumes'] ?? [] as $volume) {
|
||||
if (is_array($volume)) {
|
||||
$host = $volume['source'];
|
||||
$container = $volume['target'];
|
||||
$attr = !empty($volume['read-only']) ? 'ro' : '';
|
||||
} else {
|
||||
list($host, $container, $attr) = explodeMapping($volume);
|
||||
}
|
||||
|
||||
$serviceVolumes[$container] = [$host, $attr];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue