如何在openshift中允许图像从一个项目拉到另一个项目?

问题描述 投票:1回答:1

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

现在,我想创建类似的另一个项目testing2与我推在testing1相同的图像。我不想再发布它。

docker openshift openshift-origin openshift-enterprise
1个回答
5
投票

登录您的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

© www.soinside.com 2019 - 2024. All rights reserved.