https://rancher.com/ logo
Title
m

mysterious-crayon-60878

07/19/2022, 3:00 PM
If I wanted to pull an image (using nerdctl, docker cli, whatever) that is in the k8s.io namespace and listed in the Rancher Desktop UI, what would be the command?
k

kind-iron-72902

07/19/2022, 8:40 PM
I don't completely follow -- if the image is listed in the UI, then there's no need to pull it. But if you want to pull another image, the command is
nerdctl -n <http://k8s.io|k8s.io> pull IMAGE
.
You can actually specify other namespaces with the
-n
option (or provide no namespace at all, which will put it in the
default
namespace.
m

mysterious-crayon-60878

07/19/2022, 9:35 PM
Correct. However, when building an image using a FROM <IMAGE> in a Dockerfile that uses that image it attempts to find the image at docker.io, not in the set of images that is locally available.
Do I need to tell my
nerdctl build ...
command about the local image in some way?
k

kind-iron-72902

07/19/2022, 9:35 PM
I think all local images have to be pushed to an external repository, but let me check....
b

bitter-hairdresser-7812

07/19/2022, 9:53 PM
https://itnext.io/containerize-a-basic-html-css-js-app-with-nerdctl-rancher-desktop-817981ede2a4 Yeah I had to use the -n option to build, see that article as an example.
nerdctl -n <http://k8s.io|k8s.io> build . -t jwsy/shooter-jade:v1.0
m

mysterious-crayon-60878

07/20/2022, 12:22 AM
That FROM is for something in an external registry, not something built locally.