This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.16.7.5.4. 对不同的镜像集进行镜像(mirror)
流程
mirror命令会默认尝试镜像 u/s 镜像。这可以通过向镜像传递带有以下格式的文件来覆盖:Copy to Clipboard Copied! Toggle word wrap Toggle overflow 把它传递给
mirror命令,例如将其在本地保存为images.json。使用以下命令,本地路径挂载到容器内的/kubeconfig中,并可传递给 mirror 命令。docker run -v $(pwd)/:/kubeconfig -e KUBECONFIG=/kubeconfig/kubeconfig registry.redhat.io/openshift4/cnf-tests-rhel8:v4.7 /usr/bin/mirror --registry "my.local.registry:5000/" --images "/kubeconfig/images.json" | oc image mirror -f -
$ docker run -v $(pwd)/:/kubeconfig -e KUBECONFIG=/kubeconfig/kubeconfig registry.redhat.io/openshift4/cnf-tests-rhel8:v4.7 /usr/bin/mirror --registry "my.local.registry:5000/" --images "/kubeconfig/images.json" | oc image mirror -f -Copy to Clipboard Copied! Toggle word wrap Toggle overflow