liveBook · Manning

Container registry

As explained in Google Anthos in Action

A Docker registry is a service that stores and distributes Docker container images.

A container registry stores and distributes Docker images for use by clients and clusters. In GCP, repository operation combines project APIs, a regional Docker repository, and client authentication. Container Analysis stores image metadata, while Container Scanning checks images for vulnerabilities and incurs scanning charges. section 13.5.1

A practical GCP registry workflow includes:

  • Select the GCP project, then enable the Container Analysis API and Container Scanning API. section 13.5.1
  • Create a Docker repository in a chosen region, such as us-east4, with a description. section 13.5.1
  • Configure Docker authentication for the repository’s region using GCP credentials before storing images. section 13.5.1
  • Restrict cluster workloads to approved registries through admission policy, and test policy effects before enforcement. section 13.9.1
gcloud artifacts repositories create docker-registry --repository-format=docker --location=us-east4 --description="Docker Registry"

Create a regional Docker repository with the gcloud CLI before configuring client authentication and pushing images. section 13.5.1

Testing registry restrictions

An approved-repository constraint can permit only gcr.io and hub.evermore.local. A workload using docker.io/busybox is rejected by admission, while a privileged-container constraint can run in dry-run mode to reveal violations before enforcement. Exclusions can protect required system namespaces. section 13.9.1

How Google Anthos in Action covers it

How deep it goes
Explains API enablement, repository creation, regional authentication, and registry admission testing, but defers detailed image tagging and pushing.
Examples
Uses gcloud repository commands, regional Docker authentication, approved-registry constraints, and rejected or dry-run Kubernetes workloads.
What it assumes
Uses a GCP project, gcloud CLI, Docker client, Kubernetes workloads, and Anthos policy tooling.
What you can do after
Operate/configure a GCP Docker repository and assess registry restrictions with Gatekeeper policies.
How it connects
Connects Docker, Artifact Registry, Container Analysis, vulnerability scanning, Kubernetes, and Gatekeeper.

Also explained in

Compare how 8 books explain container registry →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Google Anthos in Action. The section links point to the parts of the book it draws on.