Skip to content

Regression for git context in bake in v0.11 #3755

@jedevc

Description

@jedevc

v0.11 contains 8bfeafa, which seems to cause a regression in bake for some reason 🤔 Maybe there's something wrong in buildx, but I can't quite establish what would have changed there.

With a docker-bake.hcl snippet like:

target "testing" {
    ssh = ["default"]
    // a fork of buildx that removes the syntax directive from the dockerfile, so we get the default builtin version from master
    context = "[email protected]/jedevc/buildx.git#testing"
}

This builds on a buildkit server built with 8bfeafaaa1c184eecb67ff012cdd6044bc3fa738~, but fails on 8bfeafaaa1c184eecb67ff012cdd6044bc3fa738 with:

$ docker buildx bake testing
[+] Building 0.1s (2/2) FINISHED                                                                                                                           
 => ERROR [internal] load build definition from Dockerfile                                                                                            0.1s
 => => transferring dockerfile:                                                                                                                       0.1s
 => ERROR [internal] load .dockerignore                                                                                                               0.1s
 => => transferring context:                                                                                                                          0.1s
------
 > [internal] load build definition from Dockerfile:
------
------
 > [internal] load .dockerignore:
------
WARNING: No output specified for testing target(s) with docker-container driver. Build result will only remain in the build cache. To push result image into registry use --push or to load image into docker use --load
ERROR: failed to solve: failed to read dockerfile: no local sources enabled

Note: if the URL is changed to be http/https, e.g. https://github.com/jedevc/buildx.git#testing, it works 🎉

What confuses me is that the plain docker buildx build using the same builder continues to work:

$ docker buildx build "[email protected]:jedevc/buildx.git#testing"

I'm not sure what could have changed in buildkit that make this fail in bake?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions