浏览代码

keep the container reference when volumes_from target a container and not a service

Signed-off-by: Guillaume Lours <[email protected]>
Guillaume Lours 3 年之前
父节点
当前提交
f30f9d9692
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      pkg/compose/create.go

+ 1 - 1
pkg/compose/create.go

@@ -680,7 +680,7 @@ func getVolumesFrom(project *types.Project, volumesFrom []string) ([]string, []s
 			continue
 			continue
 		}
 		}
 		if spec[0] == "container" {
 		if spec[0] == "container" {
-			volumes = append(volumes, strings.Join(spec[1:], ":"))
+			volumes = append(volumes, vol)
 			continue
 			continue
 		}
 		}
 		serviceName := spec[0]
 		serviceName := spec[0]