Skip to content

Conversation

jedevc
Copy link
Collaborator

@jedevc jedevc commented Apr 3, 2023

Not quite how, but at some point, ReadRemoteFiles stopped working with git remotes.

$ docker buildx bake "git@github.com:docker/buildx.git" --print binaries --progress=plain
#0 building with "container" instance using docker-container driver

#1 [internal] load git source git@github.com:docker/buildx.git
#1 ERROR: Unimplemented: unknown service moby.sshforward.v1.SSH
------
 > [internal] load git source git@github.com:docker/buildx.git:
------
ERROR: failed to find target binaries

When cloning git remotes, we need to attach the SSH agent service, so that this works:

docker buildx bake "git@github.com:docker/buildx.git" --print binaries --progress=plain
#0 building with "container" instance using docker-container driver

#1 [internal] load git source git@github.com:docker/buildx.git
#1 1.723 ref: refs/heads/master	HEAD
#1 1.849 6535f16aec98d4e94e3a5f6c9dbe736a0f407f7a	HEAD
#1 3.583 6535f16aec98d4e94e3a5f6c9dbe736a0f407f7a	refs/heads/master
#1 DONE 3.7s

#1 [internal] load git source git@github.com:docker/buildx.git
#1 CACHED
{
  "group": {
    "default": {
      "targets": [
        "binaries"
      ]
    }
  },
  "target": {
    "binaries": {
      "context": "git@github.com:docker/buildx.git",
      "dockerfile": "Dockerfile",
      "args": {
        "BUILDKIT_CONTEXT_KEEP_GIT_DIR": "1",
        "GO_VERSION": "1.20"
      },
      "target": "binaries",
      "platforms": [
        "local"
      ],
      "output": [
        "./bin/build"
      ]
    }
  }
}

Signed-off-by: Justin Chadwell <me@jedevc.com>
@jedevc jedevc requested a review from crazy-max April 3, 2023 09:53
@jedevc jedevc merged commit 5c21e80 into docker:master Apr 4, 2023
@jedevc jedevc deleted the bake-remote-file-git branch April 4, 2023 10:50
@jedevc jedevc mentioned this pull request Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants