Skip to content

Small images and vulnerability scanning

Select an icon to see what it is.

Step 4 of 6

A scanner reads the image's contents

Trivy asks dockerd for the image with GET /images/get, which returns a tar of its layers. It looks for each layer's package database, such as /var/lib/dpkg/status or /lib/apk/db/installed. That gives it the list of installed packages and versions.

$ docker run --rm -v /var/run/docker.sock:/var/run/docker.sock aquasec/trivy image alpine

GET /v1.45/images/get?names=alpine

reply: a tar archive of the image's layers and config