Skip to content

labs: ADD using git@ should not show git:// as protocol in output/error #3585

@thaJeztah

Description

@thaJeztah

When using ADD <git reference> and using git@ for the git repository, the output shows git:// as protocol used. To my understanding we don't use the git:// protocol (https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols#_the_git_protocol) in this case, so we should change the presentation to make this less ambiguous.

docker build -t foo -<<'EOF'
# syntax=docker/dockerfile:1-labs
FROM alpine
ADD git@github.com:moby/buildkit.git /bar
EOF
[+] Building 2.5s (9/10)
 => [internal] load build definition from Dockerfile                                                                            0.0s
 => => transferring dockerfile: 125B                                                                                            0.0s
 => [internal] load .dockerignore                                                                                               0.0s
 => => transferring context: 2B                                                                                                 0.0s
 => resolve image config for docker.io/docker/dockerfile:1-labs                                                                 1.2s
 => docker-image://docker.io/docker/dockerfile:1-labs@sha256:033d4afc7bdc581d28bc98b35598fffb1ead5a0dbe9ef2e00546e559b650e8da   0.8s
 => => resolve docker.io/docker/dockerfile:1-labs@sha256:033d4afc7bdc581d28bc98b35598fffb1ead5a0dbe9ef2e00546e559b650e8da       0.0s
 => => sha256:e2d8189d2e09965ae5a6258b26f6aa2198f6c22acf0f5f649ab07933d9fc0de6 2.96kB / 2.96kB                                  0.0s
 => => sha256:6feb11935ba445d8f9673f63bfe2b72a7d4dae6a732cd117b1a858075b89282d 11.55MB / 11.55MB                                0.2s
 => => sha256:033d4afc7bdc581d28bc98b35598fffb1ead5a0dbe9ef2e00546e559b650e8da 7.65kB / 7.65kB                                  0.0s
 => => sha256:12a4a575cfd6aef7e7c65cdb267d2ce0d047f88539107f42f51acb3861656c9a 482B / 482B                                      0.0s
 => => extracting sha256:6feb11935ba445d8f9673f63bfe2b72a7d4dae6a732cd117b1a858075b89282d                                       0.5s
 => [internal] load .dockerignore                                                                                               0.0s
 => [internal] load build definition from Dockerfile                                                                            0.0s
 => [internal] load metadata for docker.io/library/alpine:latest                                                                0.0s
 => ERROR git://github.com/moby/buildkit.git                                                                                    0.0s
 => [1/2] FROM docker.io/library/alpine                                                                                         0.0s
------
 > git://github.com/moby/buildkit.git:
#10 0.036 Initialized empty Git repository in /var/lib/docker/overlay2/wwummvmowx7pewk3stah6bhdy/diff/
------
failed to load cache key: rpc error: code = Unimplemented desc = unknown service moby.sshforward.v1.SSH
 => ERROR git://github.com/moby/buildkit.git                                                                                    0.0s

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions