Skip to content

Commit be000ec

Browse files
authored
Merge pull request #82 from hyperius/docker-compose-fix
EFS volume id extractor added for compatibility with docker-compose
2 parents a72b5d1 + c3f4656 commit be000ec

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

netshare/drivers/efs.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"github.com/docker/go-plugins-helpers/volume"
77
"os"
88
"strings"
9+
"regexp"
910
)
1011

1112
const (
@@ -100,6 +101,9 @@ func (e efsDriver) Unmount(r volume.UnmountRequest) volume.Response {
100101
}
101102

102103
func (e efsDriver) fixSource(name, id string) string {
104+
reg, _ := regexp.Compile("(fs-[0-9a-f]+)$")
105+
name = reg.FindString(name)
106+
103107
if e.mountm.HasOption(name, ShareOpt) {
104108
name = e.mountm.GetOption(name, ShareOpt)
105109
}

0 commit comments

Comments
 (0)