> For the complete documentation index, see [llms.txt](https://docs.prismacloud.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.prismacloud.io/admin-guide/33/vulnerability-management/registry-scanning/scan-docker-registry-v2.md).

# Docker Registry v2 (including Docker Hub)

Most vendors' registries comply with the Docker Registry version 2 API, including Docker Hub.

## Configure Docker Registry v2 Scan

For Docker Hub repositories:

* To specify an official Docker Hub repository, enter library/, followed by the short string used to designate the repo. For example, to scan the images in the official Alpine Linux repository, enter library/alpine.
* To specify non-official repositories, enter the user name or organization name, followed by a slash, followed by the name of the repo. For example, to specify the alpine repository in onescience’s account, enter onescience/alpine.
* To scan all repos from a user or organization, simply enter the user or organization name, followed by a wildcard (`*`). For example, to scan all repos created by onescience, enter onescience\*.

**Prerequisites:** You have [installed a Defender](/admin-guide/33/install/deploy-defender/defender-types.md) somewhere in your environment.

1. Open Console, and then go to **Defend > Vulnerabilities > Images > Registry settings**.
2. Select **Add registry**.
3. In the dialog, enter the following information:
   1. In **Version**, select **Docker Registry v2**.
   2. Leave **Registry** field blank. An empty field specifies Docker Hub (hub.docker.com).
   3. In **Repository name**, enter the name of the repo to scan. For example, enter **library/alpine** to scan the official Alpine image. If the repo is part of an organization, use the organization/repository format. For example, **bitnami/nginx**.
   4. Optionally enter the Repositories to exclude them from being scanned.
   5. In **Tag**, enter an image tag. Leave this field blank to scan all images, regardless of their tag.
   6. Optionally, enter Tags to exclude, to avoid scanning images with specified tags.
   7. In **Credential**, select the credentials to use.

      If you are scanning a public repository, leave this field blank.

      If you are scanning a private repository, and Console doesn’t have your credentials yet, click **Add New**. Select either **Basic authentication** or **Certificate-based authentication**, and fill out the rest of the fields. For certificate-based authentication, provide a client certificate with private key, and an optional CA certificate.

      If there are no credentials in the list, **Add** new credentials and select the Basic authentication.
   8. You can optionally enter a custom **CA certificate** in PEM format for Prisma Cloud to validate the Docker registry v2.

      Custom CA certificate validation is supported only for non-Docker nodes (e.g. OpenShift).

      Ensure that the Custom CA certificate that you use is not revoked by the issuing authority.
   9. In **OS type**, specify whether the repo holds **Linux** or **Windows** images.
   10. In **Scanners scope**, specify the collections of defenders to use for the scan.

       Console selects the available Defenders from the scope to execute the scan job according to the **Number of scanners** setting. For more information, see [deployment patterns](#deployment-patterns).
   11. In **Number of scanners**, enter the number of Defenders across which scan jobs can be distributed.
   12. Set **Cap** to the number of most recent images to scan. Leaving **Cap** set to the default value of **5** will scan the most recent 5 images. Setting this field to **0** will scan all images.
4. Select **Add and scan**.

   Verify that the images in the repository are being scanned under **Monitor > Vulnerabilities > Images > Registries**.


---

# 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.prismacloud.io/admin-guide/33/vulnerability-management/registry-scanning/scan-docker-registry-v2.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.
