Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grype fails with containerd #291

Closed
longwuyuan opened this issue Apr 14, 2021 · 6 comments
Closed

grype fails with containerd #291

longwuyuan opened this issue Apr 14, 2021 · 6 comments
Labels
bug Something isn't working

Comments

@longwuyuan
Copy link

What happened:

__$ grype docker.io/library/nginx:alpine
 _ Vulnerability DB     [checking for update]
[0007] ERROR failed to catalog: could not fetch image 'docker.io/library/nginx:alpine': unable to inspect existing image: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

What you expected to happen:
Expect to know how to use grype if I am not using docker and if I am using containerd

How to reproduce it (as minimally and precisely as possible):

Host OS = Ubuntu Focal Fossa x86_64
CRI = containerd (without docker)

_$ dpkg -l | grep containerd                                                                        1 _
ii  containerd                                 1.3.3-0ubuntu2.3                    amd64        daemon to control runC

__$ dpkg -l | grep -i docker
__$

__$ podman images                                                                                    1 _
REPOSITORY                TAG     IMAGE ID      CREATED      SIZE
docker.io/library/nginx   alpine  72ab4137bd85  12 days ago  24.1 MB
docker.io/library/alpine  latest  49f356fa4513  13 days ago  5.88 MB

__$ sudo netstat -lntp | egrep -i "docker|containerd"
tcp        0      0 127.0.0.1:42515         0.0.0.0:*               LISTEN      931/containerd      

Anything else we need to know?:

Environment:

  • Output of grype version:
__$ grype version
Application:          grype
Version:              0.9.0
BuildDate:            2021-03-26T12:16:56Z
GitCommit:            7ce9ef647ed415334920538fdaeb451876e52f4c
GitTreeState:         clean
Platform:             linux/amd64
GoVersion:            go1.14.15
Compiler:             gc
Supported DB Schema:  1
  • OS (e.g: cat /etc/os-release or similar):
__$ cat /etc/os-release 
NAME="Linux Mint"
VERSION="20.1 (Ulyssa)"
ID=linuxmint
ID_LIKE=ubuntu
PRETTY_NAME="Linux Mint 20.1"
VERSION_ID="20.1"
HOME_URL="https://www.linuxmint.com/"
SUPPORT_URL="https://forums.linuxmint.com/"
BUG_REPORT_URL="http://linuxmint-troubleshooting-guide.readthedocs.io/en/latest/"
PRIVACY_POLICY_URL="https://www.linuxmint.com/"
VERSION_CODENAME=ulyssa
UBUNTU_CODENAME=focal

@longwuyuan longwuyuan added the bug Something isn't working label Apr 14, 2021
@longwuyuan
Copy link
Author

I had downloaded the .deb file and installed. I removed that and followed the official curl based install and I got a newer version as well a working installation. Apologioes

@luhring
Copy link
Contributor

luhring commented Apr 15, 2021

@longwuyuan Not a problem! This was fantastic timing — we just yesterday added support for direct registry access (i.e. not requiring Docker) in the v0.10.2 release -> https://github.com/anchore/grype/releases/tag/v0.10.2

@longwuyuan
Copy link
Author

longwuyuan commented Apr 15, 2021 via email

@tuananh
Copy link

tuananh commented Nov 22, 2023

can we use containerd instead of docker now? the image is not yet pushed to registry.

@willmurphyscode
Copy link
Contributor

@tuananh Yes, syft supports containerd now (see anchore/syft#1793), so grype should as well. If you have any trouble with it, please let us know!

@tuananh
Copy link

tuananh commented Nov 24, 2023

it works now. the syntax is grype containerd:python:3 for example if you want to scan python:3.

this works with rootless containerd as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants