> For the complete CircleCI developer hub index, see [llms.txt](https://circleci.com/developer/llms.txt)

# hubci/sonar

Easily install and use Sonar on CircleCI. Sonar is a Docker utility tool
useful for when you want to learn more about your Docker images. You can list
and compare Docker images, their tags, and pull metrics from Docker Hub.

Currently supports Linux on amd64.


## Commands

### install

Install Sonar in a build (for amd64 Linux).


| Parameter | Type | Default | Description |
|---|---|---|---|
| `version` | string |  | The Sonar version. This is a full SemVer version.
 |

### update-readme

Update the readme (description) of a Docker image on Docker Hub using the
contents of a text file. As Docker Hub readmes support Markdown, the most
common usecase is to use a Git repository's README.md file to update
Docker Hub.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `file` | string | ./README.md | The filepath to the text file to use. |
| `image` | string |  | The image name whose Docker Hub readme shall be updated. |
| `docker-username` | env_var_name | DOCKER_USER | Environment variable (envar) that contains the Docker username. This
is where the variable name is specified. The envar value itself can
be set via project specific envars, context, the CircleCI API, and
more. Reference: https://circleci.com/docs/2.0/env-vars/
 |
| `docker-password` | env_var_name | DOCKER_PASS | Environment variable (envar) that contains the Docker password or API
token. This is where the variable name is specified. The envar value
itself can be set via project specific envars, context, the CircleCI
API, and more. Be sure not to include your password or token in plain
text in your config.Reference: https://circleci.com/docs/2.0/env-vars/
 |

### update-summary

Update the summary of a Docker image on Docker Hub from a string. A
Docker Hub image summary is limited to 100 characters.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `summary` | string |  | The string to set as the summary. Limited to 100 characters. |
| `image` | string |  | The image name whose Docker Hub summary shall be updated. |
| `docker-username` | env_var_name | DOCKER_USER | Environment variable (envar) that contains the Docker username. This
is where the variable name is specified. The envar value itself can
be set via project specific envars, context, the CircleCI API, and
more. Reference: https://circleci.com/docs/2.0/env-vars/
 |
| `docker-password` | env_var_name | DOCKER_PASS | Environment variable (envar) that contains the Docker password or API
token. This is where the variable name is specified. The envar value
itself can be set via project specific envars, context, the CircleCI
API, and more. Be sure not to include your password or token in plain
text in your config.Reference: https://circleci.com/docs/2.0/env-vars/
 |

## Jobs

### update-readme

Update the readme (description) of a Docker image on Docker Hub using the
contents of a text file. As Docker Hub readmes support Markdown, the most
common usecase is to use a Git repository's README.md file to update
Docker Hub.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `version` | string |  | The Sonar version. This is a full SemVer version.
 |
| `file` | string | ./README.md | The filepath to the text file to use. |
| `image` | string |  | The image name whose Docker Hub readme shall be updated. |
| `docker-username` | env_var_name | DOCKER_USER | Environment variable (envar) that contains the Docker username. This
is where the variable name is specified. The envar value itself can
be set via project specific envars, context, the CircleCI API, and
more. Reference: https://circleci.com/docs/2.0/env-vars/
 |
| `docker-password` | env_var_name | DOCKER_PASS | Environment variable (envar) that contains the Docker password or API
token. This is where the variable name is specified. The envar value
itself can be set via project specific envars, context, the CircleCI
API, and more. Be sure not to include your password or token in plain
text in your config.Reference: https://circleci.com/docs/2.0/env-vars/
 |