如何在openshift中允许图像从一个项目拖到另一个项目? [英] How to allow image pull from one project to another in openshift?

查看:118
本文介绍了如何在openshift中允许图像从一个项目拖到另一个项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个项目testing1,在其中发布了docker图像.

I have created one project testing1 in which i published docker images.

现在,我想创建与我在testing1中推送的图像相同的另一个项目testing2.我不想再次发布.

Now, i want to created similar another project testing2 with same images that i pushed in testing1. I don’t want to publish it again.

推荐答案

登录到openshift命令行并运行命令:

Login to your openshift command line and run command:

oc policy add-role-to-user \
    system:image-puller system:serviceaccount:testing2:default \
    --namespace=testing1

OR

oc policy add-role-to-user \
    system:image-puller system:serviceaccount:testing2:default \
    -n testing1

您的项目testing2将能够在openshift中访问项目testing1中的图像.

Your project testing2 will be able to access images from project testing1 in your openshift.

有关更多信息,请参见

For more information refer openshift Documentation

这篇关于如何在openshift中允许图像从一个项目拖到另一个项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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