如何在openshift中将图像从一个项目拖到另一个项目?
我创build了一个项目testing1
在这个项目中我发布了docker
镜像。
现在,我想创build类似的另一个项目testing2
与我在testing1
推送的相同的图像。 我不想再发布它。
login到您的openshift命令行并运行命令:
oc policy add-role-to-user \ system:image-puller system:serviceaccount:testing1:default \ --namespace=testing2
要么
oc policy add-role-to-user \ system:image-puller system:serviceaccount:testing1:default \ -n testing2
您的项目testing2
将能够在您的openshift中从项目testing1
中访问图像。
有关更多信息,请参阅openshift文档