Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker/dockerfile repository on Docker Hub does not have a README/description #756

Closed
thaJeztah opened this issue Dec 14, 2018 · 10 comments
Closed

Comments

@thaJeztah
Copy link
Member

The official Dockerfile repository on Docker Hub does not have a description https://hub.docker.com/r/docker/dockerfile

We should have a README in that repository to;

  • explain the different tags (and/or tagging scheme)
  • link to the GitHub repository (for contributing)

@tonistiigi @mataneja @seemethere

@tonistiigi
Copy link
Member

The description about the process is in #528 (comment)

@thaJeztah
Copy link
Member Author

Ah, yes; not sure how to get a README up on Docker Hub though; guess we need copy/paste something there manually?

@ijc
Copy link
Collaborator

ijc commented Dec 17, 2018

I think there is an API but it would be simplest/easiest to just have someone with suitable creds just add it via the webui. Perhaps best to keep it fairly high level with a link to the specifics to avoid having to edit it very often...

@thaJeztah
Copy link
Member Author

Yes, a short description that these images are used by the BuildKit builder, an explanation of the tagging scheme, a # syntax=... example, and links to the relevant README's on GitHub (for the experimental features) should suffice.

@rcjsuen
Copy link

rcjsuen commented May 23, 2019

From reading frontend/dockerfile/docs/experimental.md I also have no idea what I should be doing.

The features mentioned in this document are experimentally available as docker/dockerfile:experimental image.

If I run that nothing good seems to happen.

$ sudo docker run docker/dockerfile:experimental
PRI * HTTP/2.0

SM

�time="2019-05-23T11:00:10Z" level=error msg="fatal error: rpc error: code = Unavailable desc = transport is closing\nfailed to initialize client from environment\ngithub.com/moby/buildkit/frontend/gateway/grpcclient.RunFromEnvironment\n\t/src/frontend/gateway/grpcclient/client.go:83\nmain.main\n\t/src/frontend/dockerfile/cmd/dockerfile-frontend/main.go:24\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:200\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1337"
panic: failed to initialize client from environment: rpc error: code = Unavailable desc = transport is closing

goroutine 1 [running]:
main.main()
	/src/frontend/dockerfile/cmd/dockerfile-frontend/main.go:26 +0x34f

@thaJeztah
Copy link
Member Author

@rcjsuen the image should not be run as a container, but it's used behind the scenes by buildkit if you use a #syntax= statement; for example; if you have a dockerfile like this:

# syntax = docker/dockerfile:experimental

FROM alpine
RUN --mount=type=cache,target=/var/cache/apk apk add curl

And build it with

DOCKER_BUILDKIT=1 docker build .

You'll see that buildkit pulls the frontend image as part of the build process;

[+] Building 5.7s (4/4) FINISHED                                                                                                                                                                                                                                                                              
 => [internal] load .dockerignore                                                                                                                                                                                                                                                                        0.2s
 => => transferring context: 2B                                                                                                                                                                                                                                                                          0.0s
 => [internal] load build definition from Dockerfile                                                                                                                                                                                                                                                     0.2s
 => => transferring dockerfile: 156B                                                                                                                                                                                                                                                                     0.0s
 => resolve image config for docker.io/docker/dockerfile:experimental                                                                                                                                                                                                                                    2.4s
 => docker-image://docker.io/docker/dockerfile:experimental@sha256:9022e911101f01b2854c7a4b2c77f524b998891941da55208e71c0335e6e82c3                                                                                                                                                                      2.3s
 => => resolve docker.io/docker/dockerfile:experimental@sha256:9022e911101f01b2854c7a4b2c77f524b998891941da55208e71c0335e6e82c3                                                                                                                                                                          0.0s
 => => sha256:9022e911101f01b2854c7a4b2c77f524b998891941da55208e71c0335e6e82c3 2.03kB / 2.03kB                                                                                                                                                                                                           0.0s
 => => sha256:962337bd2c94ed20329caf3201963fd81d2892544c4502f1b237f5063e0fe27f 527B / 527B                                                                                                                                                                                                               0.0s
 => => sha256:8bf79a4e725097175c47f89c7b1efffe300bb4fd4e9ac45eea9daba66f81e904 897B / 897B                                                                                                                                                                                                               0.0s
 => => sha256:ef64239dde0f2477dbaa6a4416fe9220ee1031f0169abe52f9bdc7c05dabfb58 9.27MB / 9.27MB                                                                                                                                                                                                           1.7s
 => => extracting sha256:ef64239dde0f2477dbaa6a4416fe9220ee1031f0169abe52f9bdc7c05dabfb58                  
 => [internal] load metadata for docker.io/library/alpine:latest                                                                                                                                                                                                                                         0.0s
 => CACHED [1/2] FROM docker.io/library/alpine                                                                                                                                                                                                                                                           0.0s
 => [2/2] RUN --mount=type=cache,target=/var/cache/apk apk add curl                                                                                                                                                                                                                                      1.5s
 => exporting to image                                                                                                                                                                                                                                                                                   0.2s 
 => => exporting layers                                                                                                                                                                                                                                                                                  0.2s 
 => => writing image sha256:f8036d93661132f35b74bb105e68749d0e0b903b5ad9de3c3ce388c724c032fb                                                                                                                                                                                                             0.0s 

@rcjsuen
Copy link

rcjsuen commented May 23, 2019

@thaJeztah Ah, it is starting to make sense now. Thank you very much.

The only way then to test the experimental features without modifying my local dockerd is dind then, correct?

@thaJeztah
Copy link
Member Author

@rcjsuen if you are on a current version of docker (18.06 with experimental features enabled, or 18.09), you can use those experimental features just by enabling buildkit (DOCKER_BUILDKIT=1) and writing a Dockerfile that has the # syntax= ..... line at the top (to use the experimental frontend).

@rcjsuen
Copy link

rcjsuen commented May 23, 2019

@thaJeztah I understand. I see I clearly missed that when reading the experimental.md file.

Thank you for your patience with me and your help! Have a nice day!

@tiborvass
Copy link
Collaborator

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

No branches or pull requests

5 participants