> For the complete documentation index, see [llms.txt](https://docs.snyk.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.snyk.io/developer-tools/snyk-cli/scan-and-maintain-projects-using-the-cli/snyk-cli-for-snyk-container/scan-and-monitor-images.md).

# Scan and monitor images

How to scan and monitor container images with the Snyk CLI

{% hint style="info" %}
**Snyk is rolling out a new navigation.** The steps on this page describe the classic interface. If your view looks different, visit [Navigate the Snyk Web UI](https://docs.snyk.io/navigate-the-snyk-web-ui#where-things-moved) to map these options to the new interface.
{% endhint %}

## Scan and monitor images

It is common to use both `test` and `monitor` commands with Snyk Container. You can use the `snyk container test` command for quick checks. You can use the `snyk container monitor` command for ongoing assurance and to easily share results.

### Scan an image

To scan an image, run the `container test` command. For example:

```
snyk container test debian
```

The command:

1. Downloads the image, if it is not already available locally in your Docker daemon.
2. Determines the software installed in the image.
3. Sends the bill of materials to the Snyk service.
4. Returns a list of the vulnerabilities in your image.

You can use Snyk to test any image you can pull from a remote registry or any image you have built locally and made available in your local Docker daemon:

```
snyk container test <repository>:<tag>
```

If you use a Dockerfile to build your image, you can specify this when running `snyk container test`:

```
snyk container test <repository>:<tag> --file=Dockerfile
```

Specifying a Dockerfile provides more context and allows Snyk to provide clear recommendations on how to fix discovered vulnerabilities.

Snyk currently detects application vulnerabilities in your image by default.

### Monitor an image

Snyk Container also allows you to monitor images. This provides the following advantages:

* Snyk alerts you if new vulnerabilities that affect your image are disclosed without having to retest your image locally.
* Snyk interactively filters the results and explores the list of vulnerabilities in your web browser.
* You can share results on Snyk with other members of your team.

To learn more about container security, see [The importance of Container Monitoring](https://snyk.io/learn/container-security/container-monitoring/).

Users on [paid plans](https://snyk.io/plans) can also access aggregate reports of vulnerabilities across all of their Projects.

To monitor an image, run the `container monitor` command:

```
snyk container monitor <repository>:<tag>
```

This command:

1. Downloads the image if it is not already available locally in your Docker daemon.
2. Determines the software installed in the image.
3. Sends the bill of materials to the Snyk service.
4. Returns a link to the Snyk service, where you can see the results.

<figure><img src="https://558411700-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIEEjSXQQu36y0vmFV8zf%2Fuploads%2Fgit-blob-f85966f2841f354ebf016bba86087de82a9a92b4%2Fmonitor%20(1).png?alt=media" alt="Recommendations for upgrading the base image"><figcaption><p>Recommendations for upgrading the base image</p></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.snyk.io/developer-tools/snyk-cli/scan-and-maintain-projects-using-the-cli/snyk-cli-for-snyk-container/scan-and-monitor-images.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
