mirror of https://github.com/docker/compose.git
use filepath instead of path to check if the dockerfile path is abolute or not
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
This commit is contained in:
parent
bc1160de72
commit
a842522f49
|
@ -20,7 +20,6 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"path"
|
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"github.com/compose-spec/compose-go/types"
|
"github.com/compose-spec/compose-go/types"
|
||||||
|
@ -289,7 +288,7 @@ func mergeArgs(m ...types.Mapping) types.Mapping {
|
||||||
}
|
}
|
||||||
|
|
||||||
func dockerFilePath(context string, dockerfile string) string {
|
func dockerFilePath(context string, dockerfile string) string {
|
||||||
if urlutil.IsGitURL(context) || path.IsAbs(dockerfile) {
|
if urlutil.IsGitURL(context) || filepath.IsAbs(dockerfile) {
|
||||||
return dockerfile
|
return dockerfile
|
||||||
}
|
}
|
||||||
return filepath.Join(context, dockerfile)
|
return filepath.Join(context, dockerfile)
|
||||||
|
|
Loading…
Reference in New Issue