docker私人注册表用户创建 [英] docker private registry user creation

查看:113
本文介绍了docker私人注册表用户创建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在 localhost:5000 / v1 上创建了我的私有Docker注册表,但是它不提供身份验证,如何使用用户名和密码,以便只有授权的用户可以推送一个图像给它。

I have created my private docker registry running on localhost:5000/v1 but it does not provide authentication, How to have username and password so that only authorized users can push an image to it.

我也无法列出私人注册表中存在的所有图像,所有文件说运行下面的命令将列出它 localhost:5000 / v1 / search 但是它给出了一个空白的json响应:

I am also not able to list all the images present in private registry, all document says running below command will list it localhost:5000/v1/search but it gives a blank json response as:

{
  "num_results": 0, 
  "query": "", 
  "results": []
} 

如何解决?

谢谢,
Yash

Thanks, Yash

推荐答案

您的第一个问题的答案:您需要使用 nginx 在注册表前面进行实际的密码认证。有一些示例的nginx配置文件,用于 pre-1.3.9 nginx 更新版本 Docker Registry Github repo ,用nginx包装注册表;有关 nginx wiki上的身份验证配置的更多信息。

An answer to your first question: You need to use something like nginx in front of the registry to do the actual password authentication. There are example nginx configuration files for pre-1.3.9 nginx and later versions in the Docker Registry Github repo for wrapping the registry with nginx; there is more information on authentication configuration on the nginx wiki.

这篇关于docker私人注册表用户创建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆