This message was deleted.
# rancher-desktop
a
This message was deleted.
j
Can you be more specific - what is the error you are seeing?
Also, if you're looking for Trivy output to use in copacetic, I don't believe you can get that from the UI. There is potentially another option though. If you are willing to try something that isn't completely solid yet, you can install the 1.9.0 technical preview, which has the Trivy extension. That may solve your problem, not sure. And the full 1.9.0 release will be out in a few weeks, which will also have it
h
Same error as is in the issue.
Copy code
> trivy image test-producer:latest -f json
2023-06-06T13:21:55.650-0400	FATAL	image scan error: scan error: unable to initialize a scanner: unable to initialize a docker scanner: 4 errors occurred:
	* unable to inspect the image (test-producer:latest): Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
	* containerd socket not found: /run/containerd/containerd.sock
	* unable to initialize Podman client: no podman socket found: stat podman/podman.sock: no such file or directory
	* GET <https://index.docker.io/v2/library/test-producer/manifests/latest>: UNAUTHORIZED: authentication required; [map[Action:pull Class: Name:library/test-producer Type:repository]]
j
What is the output of
ls -l /var/run/docker.sock
? It should be there if you've configured Rancher Desktop to use docker/moby
If you are using nerdctl/containerd, things are more complicated
h
Thanks for your help. I'm using docker/moby. I see nothing with that ls:
Copy code
> ls -l /var/run/docker.sock
ls: /var/run/docker.sock: No such file or directory
I originally was using containerd with RD, and switched to dockerd. Did that cause the docker.sock to not get configured?
j
No, docker.sock should get configured, as long as you enabled sudo when the pop-up asking for it appeared. Otherwise, docker.sock would have been created in a location in your home directory
That could definitely be causing the problem...
h
I do have docker.sock in
~/.rd
Copy code
> ls ~/.rd
bin		docker.sock
j
Ok that is good to know. Is there a CLI flag or environment variable that can be used to make trivy use that path? If so that will probably fix the problem
h
sudo ln -s ~/.rd/docker.sock /var/run/docker.sock
fixed it. Thanks @jolly-forest-99711
j
That's great! Though if you're able to use
sudo
, I would recommend letting RD use it to create /var/run/docker.sock for you to begin with. I don't think symlinking as you have done will cause issues, but it's always better to stick to the normal way of doing things
h
Definitely. How do I have RD do it for me? If I switch to containerd and back to dockerd with that do it? (It's been a long time since I switched it the first time.)
j
I'd say the best way to do it would be to do a factory reset, ensure /var/run/docker.sock is deleted, and then start RD fresh and give it admin access when the dialog asking for it pops up