# What runs on your machines

Container registry runs nothing on your machines; this page says where your images are stored, what reads them, and what happens when something fails.

## Where things run

| Part                   | Where                                                                       |
| ---------------------- | --------------------------------------------------------------------------- |
| Registry API (`/v2/`)  | Deutsche Cloud's control plane, at your registry host                          |
| Layers                 | Deutsche Cloud's object storage; each layer stored once per organization       |
| Manifests, tags, scans | Deutsche Cloud's database                                                      |
| Scanner                | A separate Trivy container of Deutsche Cloud, pinned to an exact Trivy release |

## What reads your images

- The scanner pulls each image it scans by digest, with a registry credential of the user who
  pushed, rescanned or pulled through a cache rule, valid for at most 12 hours. Its pulls are not
  counted as uses by lifecycle rules.
- Lifecycle rules read when an image was last pulled: a pull by tag or digest records it, at most
  once an hour per image.

## The vulnerability database

The scanner refreshes its vulnerability database on a timer, every 6 hours; a scan never
downloads it and never waits for a download. A failed refresh keeps the previous database and is
retried sooner. A rescan matches the image against the database as it is then.

## When something fails

- **A push is interrupted**: the upload session keeps what arrived; a chunk must continue exactly
  where it stands, and the answer's `Range` header says how many bytes the registry holds.
- **The scanner fails**: the scan is recorded as `failed` with the error; scan again later.
- **An upstream of a pull-through cache is down or rate-limits**: the cached copy is served.
- **The lifecycle run fails for one repository**: the other repositories are still processed, and
  the next hourly run tries that one again.

## Related

- [Storage and cleanup](storage-and-cleanup.md)
- [Security in Container registry](security.md)
