mirror of
https://github.com/docker/compose.git
synced 2026-10-22 20:02:25 +00:00
Merge pull request #1704 from gtardif/fix_win_mount_socket
This commit is contained in:
commit
d16a5f4cb9
1 changed files with 3 additions and 1 deletions
|
|
@ -774,7 +774,9 @@ func isUnixAbs(path string) bool {
|
|||
|
||||
func buildMount(project types.Project, volume types.ServiceVolumeConfig) (mount.Mount, error) {
|
||||
source := volume.Source
|
||||
if volume.Type == types.VolumeTypeBind && !filepath.IsAbs(source) {
|
||||
// on windows, filepath.IsAbs(source) is false for unix style abs path like /var/run/docker.sock.
|
||||
// do not replace these with filepath.Abs(source) that will include a default drive.
|
||||
if volume.Type == types.VolumeTypeBind && !filepath.IsAbs(source) && !strings.HasPrefix(source, "/") {
|
||||
// volume source has already been prefixed with workdir if required, by compose-go project loader
|
||||
var err error
|
||||
source, err = filepath.Abs(source)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue