我创建了一个项目testing1
,其中我发布了docker
图像。
现在,我想创建类似的另一个项目testing2
与我推在testing1
相同的图像。我不想再发布它。
登录您的openshift命令行并运行命令:
oc policy add-role-to-user \
system:image-puller system:serviceaccount:testing2:default \
--namespace=testing1
要么
oc policy add-role-to-user \
system:image-puller system:serviceaccount:testing2:default \
-n testing1
您的项目testing2
将能够在您的openshift中访问项目testing1
中的图像。
有关更多信息,请参阅openshift Documentation