瀏覽代碼

fix support for devices

Signed-off-by: Nicolas De Loof <[email protected]>
Nicolas De Loof 4 年之前
父節點
當前提交
1b106f9133
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      pkg/compose/create.go

+ 3 - 0
pkg/compose/create.go

@@ -525,6 +525,9 @@ func getDeployResources(s types.ServiceConfig) container.Resources {
 		case 1:
 			src = arr[0]
 		}
+		if dst == "" {
+			dst = src
+		}
 		resources.Devices = append(resources.Devices, container.DeviceMapping{
 			PathOnHost:        src,
 			PathInContainer:   dst,