https://rancher.com/ logo
Title
w

wide-river-75558

02/15/2023, 3:43 PM
Hello, switched from docker desktop to rancher desktop this morning and trying to get trivy to work with it. I need to export the env. var CONTAINERD_ADDRESS to be what the containerd.sock is that rancher desktop is running on mac os. Where do I find this?
p

proud-jewelry-46860

02/15/2023, 7:36 PM
We only run containerd in a VM, so there wouldn't be anything sensible to export. Not that we do have a trivy-based image scanning feature built in, though; in the UI, going to the Images tab there's a Scan… action within the ⋮ glyph on the right.
w

wide-river-75558

02/15/2023, 9:27 PM
That scan option is giving me the same error, cannot find the sock
I tried that before reaching out here
Screenshot 2023-02-15 at 4.29.25 PM.png
@proud-jewelry-46860 screenshot for context
getting same log and errors when running trivy from terminal as well
p

proud-jewelry-46860

02/15/2023, 10:11 PM
Hmm, did we not tell trivy to use `/run/k3s/containerd/containerd.sock`… hmm, works for me (as a data point). (Again, note that you can't see it directly; you'd need to
rdctl shell
to get into the VM to access that socket if you're using the
containerd
container engine.)
w

wide-river-75558

02/16/2023, 12:29 AM
Ill try setting that path in env and also try rdctl shell
Thanks
ok, finally was able to test this:
/run/k3s/containerd/containerd.sock
exported at env like:
export CONTAINERD_ADDRESS=/run/k3s/containerd/containerd.sock
but still same error
tried rdctl and in the shell and same error