diff options
author | Sebastiaan van Stijn <thaJeztah@users.noreply.github.com> | 2019-09-03 11:07:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-03 11:07:20 +0200 |
commit | a114a2c0195dcdf1e8f7d34232679e84c415e532 (patch) | |
tree | 62f025eef04f2ae580f124cf6101d7ec6b6ba38e /volume | |
parent | 1a117b8b5c2ea8802a73e4e399fdf09649ae8371 (diff) | |
parent | 75a59c65880acdef589d2e6781bec83a6ef54fde (diff) | |
download | docker-a114a2c0195dcdf1e8f7d34232679e84c415e532.tar.gz |
Merge pull request #39250 from shuchow/706-cifs-lookup
Enable DNS Lookups for CIFS Volumes
Diffstat (limited to 'volume')
-rw-r--r-- | volume/local/local_unix.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/volume/local/local_unix.go b/volume/local/local_unix.go index 0b1771091f..4ac45baf25 100644 --- a/volume/local/local_unix.go +++ b/volume/local/local_unix.go @@ -97,11 +97,12 @@ func (v *localVolume) mount() error { return fmt.Errorf("missing device in volume options") } mountOpts := v.opts.MountOpts - if v.opts.MountType == "nfs" { + switch v.opts.MountType { + case "nfs", "cifs": if addrValue := getAddress(v.opts.MountOpts); addrValue != "" && net.ParseIP(addrValue).To4() == nil { ipAddr, err := net.ResolveIPAddr("ip", addrValue) if err != nil { - return errors.Wrapf(err, "error resolving passed in nfs address") + return errors.Wrapf(err, "error resolving passed in network volume address") } mountOpts = strings.Replace(mountOpts, "addr="+addrValue, "addr="+ipAddr.String(), 1) } |