# Scanning Container Images

## Syntax for scanning a public container image

```
java -jar threat-agent-latest.jar useAgentV2=false --oid={ORG_ID} --eid={ENTITY_ID} --apikey={API_KEY} image:docker.io/nginx:latest
```

## Syntax for scanning a private container image

It is recommended to setup a service account in your container registry and create a service token for your service account to be used in the Threat Agent.

```bash
java -jar agent.jar useAgentV2=false --oid={ORG_ID} --eid={ENTITY_ID} --apikey={API_KEY} --registry-login={LOGIN} --registry-password={ACCESS_TOKEN} image:docker.io/threatrix/threat-agent:latest
```


---

# Agent Instructions: 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:

```
GET https://docs.threatrix.io/threat-agent/scanning-container-images.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
