Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1704 from gtardif/fix_win_mount_socket
Browse files Browse the repository at this point in the history
  • Loading branch information
ndeloof authored May 24, 2021
2 parents 003d61f + 7a25378 commit d16a5f4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion local/compose/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d16a5f4

Please sign in to comment.