mirror of https://github.com/docker/compose.git
restore support for `compose build` with a git URL
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
7205d918ad
commit
29179840c3
|
@ -30,6 +30,7 @@ import (
|
||||||
"github.com/docker/buildx/util/buildflags"
|
"github.com/docker/buildx/util/buildflags"
|
||||||
xprogress "github.com/docker/buildx/util/progress"
|
xprogress "github.com/docker/buildx/util/progress"
|
||||||
"github.com/docker/cli/cli/command"
|
"github.com/docker/cli/cli/command"
|
||||||
|
"github.com/docker/docker/pkg/urlutil"
|
||||||
bclient "github.com/moby/buildkit/client"
|
bclient "github.com/moby/buildkit/client"
|
||||||
"github.com/moby/buildkit/session"
|
"github.com/moby/buildkit/session"
|
||||||
"github.com/moby/buildkit/session/auth/authprovider"
|
"github.com/moby/buildkit/session/auth/authprovider"
|
||||||
|
@ -288,7 +289,7 @@ func mergeArgs(m ...types.Mapping) types.Mapping {
|
||||||
}
|
}
|
||||||
|
|
||||||
func dockerFilePath(context string, dockerfile string) string {
|
func dockerFilePath(context string, dockerfile string) string {
|
||||||
if path.IsAbs(dockerfile) {
|
if urlutil.IsGitURL(context) || path.IsAbs(dockerfile) {
|
||||||
return dockerfile
|
return dockerfile
|
||||||
}
|
}
|
||||||
return filepath.Join(context, dockerfile)
|
return filepath.Join(context, dockerfile)
|
||||||
|
|
Loading…
Reference in New Issue