Skip to content

Commit

Permalink
Merge pull request #82 from hyperius/docker-compose-fix
Browse files Browse the repository at this point in the history
EFS volume id extractor added for compatibility with docker-compose
  • Loading branch information
gondor authored Oct 10, 2016
2 parents a72b5d1 + c3f4656 commit be000ec
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions netshare/drivers/efs.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"github.com/docker/go-plugins-helpers/volume"
"os"
"strings"
"regexp"
)

const (
Expand Down Expand Up @@ -100,6 +101,9 @@ func (e efsDriver) Unmount(r volume.UnmountRequest) volume.Response {
}

func (e efsDriver) fixSource(name, id string) string {
reg, _ := regexp.Compile("(fs-[0-9a-f]+)$")
name = reg.FindString(name)

if e.mountm.HasOption(name, ShareOpt) {
name = e.mountm.GetOption(name, ShareOpt)
}
Expand Down

0 comments on commit be000ec

Please sign in to comment.