Skip to content

docs: update syntax for labs channel in examples#3577

Merged
tonistiigi merged 1 commit into
moby:masterfrom
thaJeztah:docs_update_master_labs
Feb 4, 2023
Merged

docs: update syntax for labs channel in examples#3577
tonistiigi merged 1 commit into
moby:masterfrom
thaJeztah:docs_update_master_labs

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

The dockerfile:1-labs frontend is now updated to 1.5-labs, which includes this feature

The dockerfile:1-labs frontend is now updated to 1.5-labs, which
includes this feature

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah
Copy link
Copy Markdown
Member Author

Curious though; using git@, the output mentions git://github.com/moby/buildkit.git - is that a presentation issue, or is it actually using git:// as protocol?

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

@tonistiigi
Copy link
Copy Markdown
Member

is that a presentation issue, or is it actually using git:// as protocol?

It is presentation. Sources need a protocol in the name to define the type. That isn't always the transfer protocol. In here it should just show the ADD dockerfile command. You can pass --ssh default to make that Dockerfile work.

@tonistiigi tonistiigi merged commit 3834b2b into moby:master Feb 4, 2023
@thaJeztah thaJeztah deleted the docs_update_master_labs branch February 4, 2023 09:03
@thaJeztah
Copy link
Copy Markdown
Member Author

is that a presentation issue, or is it actually using git:// as protocol?

It is presentation. Sources need a protocol in the name to define the type. That isn't always the transfer protocol. In here it should just show the ADD dockerfile command. You can pass --ssh default to make that Dockerfile work.

Ah, thx, yes, I thought it was presentation (but didn't have ssh agent set up on that machine, so didn't try)

We should probably look at that, as it's confusing; the git:// scheme has been deprecated by GitHub, and (IIUC) we're not actually using it here? https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols#_the_git_protocol

I'll create a ticket for discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants