|
@@ -10,6 +10,7 @@ import (
|
|
|
"strings"
|
|
|
|
|
|
"github.com/Sirupsen/logrus"
|
|
|
+ "github.com/docker/docker/api/types"
|
|
|
containertypes "github.com/docker/docker/api/types/container"
|
|
|
mounttypes "github.com/docker/docker/api/types/mount"
|
|
|
"github.com/docker/docker/pkg/chrootarchive"
|
|
@@ -462,3 +463,21 @@ func cleanResourcePath(path string) string {
|
|
|
func (container *Container) EnableServiceDiscoveryOnDefaultNetwork() bool {
|
|
|
return false
|
|
|
}
|
|
|
+
|
|
|
+// GetMountPoints gives a platform specific transformation to types.MountPoint. Callers must hold a Container lock.
|
|
|
+func (container *Container) GetMountPoints() []types.MountPoint {
|
|
|
+ mountPoints := make([]types.MountPoint, 0, len(container.MountPoints))
|
|
|
+ for _, m := range container.MountPoints {
|
|
|
+ mountPoints = append(mountPoints, types.MountPoint{
|
|
|
+ Type: m.Type,
|
|
|
+ Name: m.Name,
|
|
|
+ Source: m.Path(),
|
|
|
+ Destination: m.Destination,
|
|
|
+ Driver: m.Driver,
|
|
|
+ Mode: m.Mode,
|
|
|
+ RW: m.RW,
|
|
|
+ Propagation: m.Propagation,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ return mountPoints
|
|
|
+}
|