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

[Feature] Quick Link for docker pull #42

Closed
onizet opened this issue Jun 15, 2018 · 11 comments · Fixed by #43 or #102
Closed

[Feature] Quick Link for docker pull #42

onizet opened this issue Jun 15, 2018 · 11 comments · Fixed by #43 or #102
Assignees
Labels
enhancement Related to Docker Registry Issues related to docker registry and not the UI

Comments

@onizet
Copy link
Contributor

onizet commented Jun 15, 2018

Hi,

Following your remarks when I've submitted my PR, you asked me about improvements.
One feature I really appreciate in other registry frontend, is the generated link "docker pull registry/image:tag" which avoid me to type the long command myself.

But it will be very more helpful if you can add the @sha256.
For keeping the UI as light as now, you can just add a "copy to clipboard" icon.

What do you think?

@Joxit
Copy link
Owner

Joxit commented Jun 15, 2018

Hi,
Thank you again for your feedback! :)
Yes, these are a good ideas ! I will try to add this feature! Thanks again 😉
That's right, sha256 should be great sometimes. I will add a short sha256 (8 or 12 char)
Copy to clipboard should be also good

@Joxit
Copy link
Owner

Joxit commented Jun 17, 2018

Does this type of UI seem correct to you?
One icon for copy to clipboard and the display of the sha256 when we hover the tag.

docker-registry-ui-copy-to-clipboard-and-sha256

@onizet
Copy link
Contributor Author

onizet commented Jun 17, 2018

Wow you have been very quick :-) this is very nice and looks very good.
Does the copy to clipboard include the sha? Btw, good idea to have shorten the sha because yes, we only read the beginning :-)

@Joxit
Copy link
Owner

Joxit commented Jun 17, 2018

Hey hey, thx. Only copy to clipboard is ready, sha256 need some rework.

Nope, copy to clopboard copy this docker pull your.registry.com/your/image:tag
But maybe I should copy only your.registry.com/your/image:tag and not the docker pull command ? (to be used with the docker push or docker pull).

Code is here

@onizet
Copy link
Contributor Author

onizet commented Jun 17, 2018

I will say (but this is only my opinion), to keep the docker pull. The push is more likely used from continuous build or any other automated system.

Joxit added a commit that referenced this issue Jun 17, 2018
Joxit added a commit that referenced this issue Jun 18, 2018
[feat #42] Add copy to clipboard for images with tag and add sha256
@Joxit Joxit closed this as completed in cc62475 Jun 19, 2018
@onizet
Copy link
Contributor Author

onizet commented Jun 20, 2018

Hello,
Thank you for your commit. I did some test and found an error.
When I click on the "copy to clipboard" icon, I get this: docker pull [**REGISTRY_TITLE**]/image:tag

Is it possible to have a second icon or a toggle button to copy also the sha256 inside the command? This is useful for production environment, where Trusted Content is turned on.

@Joxit
Copy link
Owner

Joxit commented Jun 20, 2018

Hi,
Thanks, so that mean URL is not used and you use REGISTRY_URL instead right ?
Hum... I will use the base URL of the UI when URL is not defined instead of REGISTRY_TITLE.

Hum... Or it can be a feature only for static docker-registry-ui with a specific env var ? So for these registries there will always be the sha256.

I noticed something, to pull with trusted content, it needs the sha256 of the digest and not the sha256 of the image. The one I get is the sha256 of the image... :/

@Joxit Joxit reopened this Jun 20, 2018
@onizet
Copy link
Contributor Author

onizet commented Jun 20, 2018

Indeed, I'm using the static image, with both REGISTRY_TITLE and REGISTRY_URL defined (like in my PR for the documentation).

Oh this is quite disappointing for the digest. I weren't aware about that :-(

I found that you have to use a http header when requesting the image:
https://github.com/docker/distribution/blob/c8d8e7e357a1e5cf39aec1cfd4b3aef82414b3fc/docs/spec/manifest-v2-2.md

@Joxit
Copy link
Owner

Joxit commented Jun 21, 2018

Okay, registry URL is now fixed.

Question: Have you ever tried the trusted pull ? When you use it, is the tag of your image updated?
When I tried it, the tag was not taken into account.
Example :

$ docker pull alpine:latest@sha256:e1871801d30885a610511c867de0d6baca7ed4e6a2573d506bbec7fd3b03873f 
sha256:e1871801d30885a610511c867de0d6baca7ed4e6a2573d506bbec7fd3b03873f: Pulling from library/alpine
ff3a5c916c92: Already exists 
Digest: sha256:e1871801d30885a610511c867de0d6baca7ed4e6a2573d506bbec7fd3b03873f
Status: Downloaded newer image for alpine@sha256:e1871801d30885a610511c867de0d6baca7ed4e6a2573d506bbec7fd3b03873f
$ docker images --digests | grep alpine
REPOSITORY                                               TAG                 DIGEST                                                                    IMAGE ID            CREATED             SIZE
alpine                                                   <none>              sha256:e1871801d30885a610511c867de0d6baca7ed4e6a2573d506bbec7fd3b03873f   3fd9065eaf02        5 months ago        4.15MB

In my example, I pulled alpine:latest with digest but TAG is still <none>

Thx for the link, I will read this a bit later.

@onizet
Copy link
Contributor Author

onizet commented Jun 21, 2018

Well to be honest, I did not yet enforce the Content trust but this is on my roadmap.
I did pull some images with the digest (bad network which corrupt my layers) and see the "none" tag as you. The same behavior happens with Docker Swarm when you use the docker stack.

I know there are many issues still open in Docker here and here but it's a matter of time before a fix 🤞 .

@Joxit
Copy link
Owner

Joxit commented Jul 22, 2018

Ok, I leave this issue open the time that docker solve the problem :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Related to Docker Registry Issues related to docker registry and not the UI
Projects
2 participants