anchorectl archive
Archive rule and image operations.
Every command on this page also accepts the global flags.
Subcommands
- archive image — Archive image related operations
- archive rule — Archive rule related operations
archive image
Archive image related operations.
anchorectl archive image [command]
Subcommands
- archive image add — Archive images
- archive image delete — Performs a synchronous archive deletion
- archive image get — Returns the archive metadata record identifying the image and tags for the analysis in the archive.
- archive image list — List archived images
- archive image restore — Creates a new analysis task that is executed asynchronously
archive image add
Archive images.
anchorectl archive image add IMAGE_DIGESTS [flags]
Arguments
| Argument | Description |
|---|---|
IMAGE_DIGESTS | List of image digests to archive. |
Flags
| Flag | Type | Environment variable | Default | Required | Description |
|---|---|---|---|---|---|
-o, --output | string | ANCHORECTL_FORMAT | text | No | The format to show the results. Allowable values: text, json, json-raw, id. See Output Formats. |
archive image delete
Performs a synchronous archive deletion.
anchorectl archive image delete IMAGEDIGEST [flags]
Aliases: del
Arguments
| Argument | Description |
|---|---|
IMAGEDIGEST | Image digest to delete from archive. |
Flags
| Flag | Type | Environment variable | Default | Required | Description |
|---|---|---|---|---|---|
--force | bool | ANCHORECTL_ARCHIVE_IMAGE_FORCE | false | No | Force archive image deletion. |
-o, --output | string | ANCHORECTL_FORMAT | text | No | The format to show the results. Allowable values: text, json, json-raw, id. See Output Formats. |
archive image get
Returns the archive metadata record identifying the image and tags for the analysis in the archive.
anchorectl archive image get IMAGE_DIGEST [flags]
Arguments
| Argument | Description |
|---|---|
IMAGE_DIGEST | The image digest to identify the image analysis. |
Flags
| Flag | Type | Environment variable | Default | Required | Description |
|---|---|---|---|---|---|
-o, --output | string | ANCHORECTL_FORMAT | text | No | The format to show the results. Allowable values: text, json, json-raw, id. See Output Formats. |
archive image list
List archived images.
anchorectl archive image list [flags]
Flags
| Flag | Type | Environment variable | Default | Required | Description |
|---|---|---|---|---|---|
-o, --output | string | ANCHORECTL_FORMAT | text | No | The format to show the results. Allowable values: text, json, json-raw, id. See Output Formats. |
archive image restore
Creates a new analysis task that is executed asynchronously.
anchorectl archive image restore DIGEST [flags]
Arguments
| Argument | Description |
|---|---|
DIGEST | The image digest identify the analysis. Archived analyses are based on digest, tag records are restored as analysis is restored. |
Flags
| Flag | Type | Environment variable | Default | Required | Description |
|---|---|---|---|---|---|
--force | bool | ANCHORECTL_ARCHIVE_IMAGE_FORCE | false | No | Override any existing entry in the system. |
-o, --output | string | ANCHORECTL_FORMAT | text | No | The format to show the results. Allowable values: text, json, json-raw, id. See Output Formats. |
archive rule
Archive rule related operations.
anchorectl archive rule [command]
Subcommands
- archive rule add — Add an analysis archive rule
- archive rule delete — Delete an analysis archive rule
- archive rule get — Get an analysis archive rule
- archive rule list — List the analysis archive rules
archive rule add
Add an analysis archive rule.
anchorectl archive rule add [flags]
Flags
| Flag | Type | Environment variable | Default | Required | Description |
|---|---|---|---|---|---|
--transition | string | ANCHORECTL_ARCHIVE_RULE_TRANSITION | "" | Yes | The type of transition to make. If “archive”, then archive an image from the working set and remove it from the working set. If “delete”, then match against archived images and delete from the archive if match. Allowable values: archive, delete. |
--analysis-age-days | int | ANCHORECTL_ARCHIVE_RULE_ANALYSIS_AGE_DAYS | 0 | No | Matches if the analysis is strictly older than this number of days. |
--exclude-expiration-days | int | ANCHORECTL_ARCHIVE_RULE_EXCLUDE_EXPIRATION_DAYS | 0 | No | How long the image selected will be excluded from the archive transition. |
--exclude-last-seen-in-days | int | ANCHORECTL_ARCHIVE_RULE_EXCLUDE_LAST_SEEN_IN_DAYS | 0 | No | Exclude image from archive if last seen in inventory within defined number of days. |
--exclude-selector-registry | string | ANCHORECTL_ARCHIVE_RULE_EXCLUDE_SELECTOR_REGISTRY | "" | No | The registry section of a pull string. e.g. with “docker.io/anchore/anchore-engine:latest”, this is “docker.io”. |
--exclude-selector-repository | string | ANCHORECTL_ARCHIVE_RULE_EXCLUDE_SELECTOR_REPOSITORY | "" | No | The repository section of a pull string. e.g. with “docker.io/anchore/anchore-engine:latest”, this is “anchore/anchore-engine”. |
--exclude-selector-tag | string | ANCHORECTL_ARCHIVE_RULE_EXCLUDE_SELECTOR_TAG | "" | No | The tag-only section of a pull string. e.g. with “docker.io/anchore/anchore-engine:latest”, this is “latest”. |
-i, --input | string | ANCHORECTL_INPUT | "" | No | Path to a JSON input file or - to read from stdin. |
--max-images-per-account | int | ANCHORECTL_ARCHIVE_RULE_MAX_IMAGES_PER_ACCOUNT | 0 | No | This is the maximum number of image analyses an account can have. Can only be set on system_global rules. |
-o, --output | string | ANCHORECTL_FORMAT | text | No | The format to show the results. Allowable values: text, json, json-raw, id. See Output Formats. |
--rule-id | string | ANCHORECTL_ARCHIVE_RULE_RULE_ID | "" | No | Unique identifier for archive rule. |
--selector-registry | string | ANCHORECTL_ARCHIVE_RULE_SELECTOR_REGISTRY | * | No | The registry section of a pull string. e.g. with “docker.io/anchore/anchore-engine:latest”, this is “docker.io”. |
--selector-repository | string | ANCHORECTL_ARCHIVE_RULE_SELECTOR_REPOSITORY | * | No | The repository section of a pull string. e.g. with “docker.io/anchore/anchore-engine:latest”, this is “anchore/anchore-engine”. |
--selector-tag | string | ANCHORECTL_ARCHIVE_RULE_SELECTOR_TAG | * | No | The tag-only section of a pull string. e.g. with “docker.io/anchore/anchore-engine:latest”, this is “latest”. |
--system-global | bool | ANCHORECTL_ARCHIVE_RULE_SYSTEM_GLOBAL | false | No | True if the rule applies to all accounts in the system. This is only available to admin users to update/modify, but all users with permission to list rules can see them. |
--tag-versions-newer | int | ANCHORECTL_ARCHIVE_RULE_TAG_VERSIONS_NEWER | 0 | No | Number of images mapped to the tag that are newer. |
archive rule delete
Delete an analysis archive rule.
anchorectl archive rule delete ID [flags]
Aliases: del
Arguments
| Argument | Description |
|---|---|
ID | The rule id. |
Flags
| Flag | Type | Environment variable | Default | Required | Description |
|---|---|---|---|---|---|
-o, --output | string | ANCHORECTL_FORMAT | text | No | The format to show the results. Allowable values: text, json, json-raw, id. See Output Formats. |
archive rule get
Get an analysis archive rule.
anchorectl archive rule get ID [flags]
Arguments
| Argument | Description |
|---|---|
ID | The rule id. |
Flags
| Flag | Type | Environment variable | Default | Required | Description |
|---|---|---|---|---|---|
-o, --output | string | ANCHORECTL_FORMAT | text | No | The format to show the results. Allowable values: text, json, json-raw, id. See Output Formats. |
archive rule list
List the analysis archive rules.
anchorectl archive rule list [flags]
Flags
| Flag | Type | Environment variable | Default | Required | Description |
|---|---|---|---|---|---|
--global | bool | ANCHORECTL_ARCHIVE_RULE_GLOBAL | true | No | Include system global rules (owned by admin) even for non-admin users. |
-o, --output | string | ANCHORECTL_FORMAT | text | No | The format to show the results. Allowable values: text, json, json-raw, id. See Output Formats. |