Skip to content
This repository has been archived by the owner on Jan 27, 2023. It is now read-only.

Commit

Permalink
Updated docs for max image size to have its own page
Browse files Browse the repository at this point in the history
Signed-off-by: Zane Burstein <zane.burstein@anchore.com>
  • Loading branch information
zburstein committed Feb 2, 2021
1 parent c045794 commit 69e0ab8
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 3 deletions.
2 changes: 2 additions & 0 deletions docs/content/docs/install/configuration/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Jump to the following configuration guide below:
- [Custom Certificates]({{< ref "/docs/install/configuration/custom_certs" >}})
- [TLS / SSL]({{< ref "/docs/install/configuration/tls_ssl_config" >}})
- [Network Proxies]({{< ref "/docs/install/configuration/network_proxies" >}})
- [Max Image Size]({{< ref "/docs/install/configuration/max_image_size" >}})


**NOTE** - The latest default configuration file can always be extracted from the Anchore Engine container to review the latest options and environment overrides using the following process:

Expand Down
10 changes: 10 additions & 0 deletions docs/content/docs/install/configuration/max_image_size.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: "Max Image Size"
linkTitle: "Max Image Size"
weight: 5
---

## Setting Size Filter
As of v0.9.1, Anchore Engine can be configured to have a size limit for images being added for analysis. Images that exceed the configured maximum size will not be added to Anchore and the catalog service will log an error message providing details of the failure. This size limit is applied when adding images to anchore via the [api/cli]({{< ref "docs/usage/cli_usage/images/_index.md#adding-an-image" >}}), [tag subscriptions]({{< ref "docs/usage/cli_usage/subscriptions/_index.md#tag-updates" >}}), and [repository watchers]({{< ref "/docs/usage/cli_usage/repositories/_index.md#watching-repositories" >}}).

The max size feature is disabled by default but can be enabled via `max_compressed_image_size_mb` in the configuration file, which represents the size limit in MB of the compressed image. Values less than 0 will disable the feature and allow images of any size to be added to Anchore. A value of 0 will be enforced and prevent any images from being added. Non-integer values will cause bootstrap of the service to fail. If using compose with the default config, this can be set through the `ANCHORE_MAX_COMPRESSED_IMAGE_SIZE_MB` env variable on the catalog service. If using helm, it can be defined in the values file via `anchoreGlobal.maxCompressedImageSizeMB`
2 changes: 1 addition & 1 deletion docs/content/docs/usage/cli_usage/images/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ For an image that has not yet been analyzed, the status will appear as *not_anal

The image type is shown as `docker`, future release will support the analysis of OCI formatted images.

As of v0.9.1, Anchore Engine can be configured to have a size limit for images being added for analysis. This is disabled by default, but can be configure through the configuration variable `max_compressed_image_size_mb`, which if using the default configuration file can be set through `ANCHORE_MAX_COMPRESSED_IMAGE_SIZE_MB` env variable. This defines a size limit (MB) of the compressed size of the image and will prevent the image from being added for analysis in anchore if the image exceeds the given size. A value less than 0 disables this functionality and allows an image of any size to be added. Note that this size limit is also applied to [tag subscriptions]({{< ref "/docs/usage/cli_usage/subscriptions/_index.md#tag-updates" >}}) and [repository watchers]({{< ref "/docs/usage/cli_usage/repositories/_index.md#watching-repositories" >}}).
As of v0.9.1, Anchore Engine can be configured to have a size limit for images being added for analysis. Attempting to add an image that exceeds the configured size will fail, return a 400 API error, and log an error message in the catalog service detailing the failure. This feature is disabled by default so see [documentation]({{< ref "docs/install/configuration/max_image_size.md" >}}) for additional details on the functionality of this feature and instructions on how to configure the limit

### Adding Images That You Own

Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/usage/cli_usage/repositories/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ The repo watch command instructs the Anchore Engine to monitor a repository for

`$ anchore-cli repo watch repo.example.com/myrepo`

Note that [max image size]({{< ref "/docs/usage/cli_usage/images/_index.md#adding-an-image" >}}) applies to the repository watcher. Images that exceed the max configured size in the repo being watched will not be added and a message will be logged in the catalog service.
As of v0.9.1, Anchore Engine can be configured to have a size limit for images being added for analysis. This feature applies to the repo watcher. Images that exceed the max configured size in the repo being watched will not be added and a message will be logged in the catalog service. This feature is disabled by default so see [documentation]({{< ref "docs/install/configuration/max_image_size.md" >}}) for additional details on the functionality of this feature and instructions on how to configure the limit

## Removing a Repository and All Images

Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/usage/cli_usage/subscriptions/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ For example, if you had a subscription to the docker.io/library/node:latest tag

This subscription is activated automatically when a new tag is added to the Anchore Engine.

The configuration for a [max image size]({{< ref "/docs/usage/cli_usage/images/_index.md#adding-an-image" >}}) applies to tag updates. If the new image associated with the tag exceeds the defined limit then it will fail to update in anchore and an error message will be logged in the catalog service.
As of v0.9.1, Anchore Engine can be configured to have a size limit for images being added for analysis. This limit applies to tag subscriptions. If the new image associated with the tag exceeds the defined limit then it will fail to update in anchore and an error message will be logged in the catalog service. This feature is disabled by default so see [documentation]({{< ref "docs/install/configuration/max_image_size.md" >}}) for additional details on the functionality of this feature and instructions on how to configure the limit

**Note:** If this subscription is disabled the Anchore Engine will not monitor the registry for new images.

Expand Down

0 comments on commit 69e0ab8

Please sign in to comment.