Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/scala/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
minishift-为openshift内部docker注册表设置身份验证?_Openshift_Docker Registry_Minishift - Fatal编程技术网

minishift-为openshift内部docker注册表设置身份验证?

minishift-为openshift内部docker注册表设置身份验证?,openshift,docker-registry,minishift,Openshift,Docker Registry,Minishift,在Ubuntu桌面上,使用minishift启动OC集群。docker注册表在默认命名空间中可用 如何为openshift集群中运行的docker注册表设置身份验证? 如何允许像开发者、系统或openshift的任何用户这样的用户在内部docker注册表中推/拉图像 我已在openshift中启用docker服务的路由 root@desktop:~# docker login -p 5d2XKusYJ9xB6sg1_uRfwPE8Ap3FQMg8_MrR9IEw3N8 -u aprasath d

在Ubuntu桌面上,使用minishift启动OC集群。docker注册表在默认命名空间中可用

如何为openshift集群中运行的docker注册表设置身份验证? 如何允许像开发者、系统或openshift的任何用户这样的用户在内部docker注册表中推/拉图像

我已在openshift中启用docker服务的路由

root@desktop:~# docker login -p 5d2XKusYJ9xB6sg1_uRfwPE8Ap3FQMg8_MrR9IEw3N8 -u aprasath docker-registry-default.127.0.0.1.nip.io
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded
root@desktop:~# docker push docker-registry-default.127.0.0.1.nip.io/myproject/hello-world
The push refers to repository [docker-registry-default.127.0.0.1.nip.io/myproject/hello-world]
af0b15c8625b: Pushing [==================================================>]  3.584kB
unauthorized: authentication required
root@desktop:~# minishift addons list
- admin-user             : enabled  P(0)
- registry-route         : enabled  P(0)
下面是imagestream的创建、标记和推送到注册表输出

 root@desktop:~# oc create imagestream ghost
 Error from server (AlreadyExists): imagestreams.image.openshift.io "ghost" already exists

root@desktop:~ docker tag ghost docker-registry-default.127.0.0.1.nip.io/myproject/ghost:latest

root@desktop:~ docker push docker-registry-default.127.0.0.1.nip.io/myproject/ghost:latest
The push refers to repository [docker-registry-default.127.0.0.1.nip.io/myproject/ghost]
6545fabd1db4: Pushing [==================================================>]  4.096kB
e1b5357c9029: Pushing [==================================================>]  205.2MB/205.2MB
2f546e8c419e: Pushing [==================================================>]  25.33MB/25.33MB
2f5caec27732: Pushing [==================================================>]  1.287MB/1.287MB
da4dc4c42b60: Pushing [==================================================>]  3.584kB
24ad92b56299: Waiting 
4eab4d25c303: Waiting 
e2dd6cf79115: Waiting 
67ecfc9591c8: Waiting 
unauthorized: authentication required

查看您所做的与“差异是imagestream创建”中所述的比较。但是命令仍然失败。oc create imagestream ghost,docker tag ghost docker registry default.127.0.0.1.nip.io:443/myproject/ghost:latest,docker push docker registry default.127.0.0.1.nip.io/myproject/ghost:latest编辑您的问题,并添加您运行的命令和按照该食谱出现的错误。您的评论无助于更好地理解事物。@Graham Dumpleton-图像流是创建并执行标记并推送到注册表的。错误是push命令抛出错误“authentication required”,您没有显示该令牌的来源。根据烹饪书中的说明,是使用
ocwhoami--showtoken
来获取它,它是否对应于实际用户。或者您正在为服务帐户使用令牌。如果是服务帐户,它可能没有适当的角色来使用注册表。