restore support for `compose build` with a git URL

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
Nicolas De Loof 2021-11-17 08:11:08 +01:00 committed by Nicolas De loof
parent 7205d918ad
commit 29179840c3
1 changed files with 2 additions and 1 deletions

View File

@ -30,6 +30,7 @@ import (
"github.com/docker/buildx/util/buildflags"
xprogress "github.com/docker/buildx/util/progress"
"github.com/docker/cli/cli/command"
"github.com/docker/docker/pkg/urlutil"
bclient "github.com/moby/buildkit/client"
"github.com/moby/buildkit/session"
"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 {
if path.IsAbs(dockerfile) {
if urlutil.IsGitURL(context) || path.IsAbs(dockerfile) {
return dockerfile
}
return filepath.Join(context, dockerfile)