When deploying a simple workload using 'kubectl appy -f', we met the following error.
Failed to inspect image "ubuntu:latest": rpc error: code = Unknown desc = short-name "ubuntu:latest" did not resolve to an alias and no containers-registries.conf(5) was found Create a registries.conf and install it to /etc/containers to fix this issue. The contents come from test/registries.conf in cri-o git repo, with test specific alias removed. Signed-off-by: Chen Qi <[email protected]> --- recipes-containers/cri-o/cri-o_git.bb | 2 ++ recipes-containers/cri-o/files/registries.conf | 1 + 2 files changed, 3 insertions(+) create mode 100644 recipes-containers/cri-o/files/registries.conf diff --git a/recipes-containers/cri-o/cri-o_git.bb b/recipes-containers/cri-o/cri-o_git.bb index f69dc0f..6e58b49 100644 --- a/recipes-containers/cri-o/cri-o_git.bb +++ b/recipes-containers/cri-o/cri-o_git.bb @@ -19,6 +19,7 @@ SRC_URI = "\ git://github.com/kubernetes-sigs/cri-o.git;branch=release-1.25;name=cri-o;protocol=https \ file://0001-Makefile-force-symlinks.patch \ file://crio.conf \ + file://registries.conf \ " # Apache-2.0 for docker @@ -100,6 +101,7 @@ do_install() { install -d ${D}${localstatedir}/lib/crio install -d ${D}${sysconfdir}/containers install -m 0644 ${S}/src/import/contrib/policy.json ${D}${sysconfdir}/containers + install -m 0644 ${WORKDIR}/registries.conf ${D}${sysconfdir}/containers } FILES:${PN}-config = "${sysconfdir}/crio/config/*" diff --git a/recipes-containers/cri-o/files/registries.conf b/recipes-containers/cri-o/files/registries.conf new file mode 100644 index 0000000..0b929da --- /dev/null +++ b/recipes-containers/cri-o/files/registries.conf @@ -0,0 +1 @@ +unqualified-search-registries = ['quay.io' ,'registry.access.redhat.com', 'registry.fedoraproject.org', 'docker.io'] -- 2.37.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#7865): https://lists.yoctoproject.org/g/meta-virtualization/message/7865 Mute This Topic: https://lists.yoctoproject.org/mt/97025063/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
