Artifact Registry in Google Cloud: The Secure Warehouse for Your Container Images and Software Packages

Artifact Registry in Google Cloud: The Secure Warehouse for Your Container Images and Software Packages

A complete, plain-English guide to Artifact Registry: how repositories, formats, remote and virtual repositories, IAM, vulnerability scanning, cleanup policies and CI/CD integrations work together to store, protect and deliver the building blocks of your software.

Imagine a large factory that builds cars. Parts arrive from many suppliers: engines, tires, seats, screws. The factory does not leave these parts lying around in random corners. It keeps them in a well-organized, locked warehouse where every part is labeled, counted, inspected and handed out only to people who are allowed to take them. If a supplier delivers a faulty batch, the warehouse can tell you exactly which cars received it. Software works the same way. Modern applications are built from container images, libraries and packages, and these pieces need a trustworthy warehouse. Artifact Registry is that warehouse on Google Cloud. In this guide we start from the first idea and build up to the choices that keep a software supply chain fast, organized and safe.

1What Is Artifact Registry?

Before looking at features, let us understand what an “artifact” is and why it needs a registry.

What is an artifact?

An artifact is any file or bundle produced or used while building and running software. Examples include a container image that holds an application and everything it needs to run, a Java library packaged as a jar file, a JavaScript package, a Python package, or a Helm chart that describes how to install an application on Kubernetes. Artifacts are the finished parts that get passed from one stage of software delivery to the next.

The one-sentence definition

Artifact Registry is Google Cloud’s fully managed service for storing, managing and securing container images and language packages. It gives your teams a single place to keep these artifacts, control who can use them, scan them for known weaknesses and deliver them quickly to the systems that run your applications.

Simple Analogy

Think of a public library with a very strict librarian. Each book (artifact) has a catalog number and a version. Some shelves are open to everyone, some are restricted to staff, and the librarian checks every returned book for damage. Artifact Registry is the library, and the librarian is the set of permissions, scans and rules around it.

The problem it solves

Without a central registry, teams store images and packages in scattered places: personal laptops, shared drives, public websites or separate tools for each language. This makes it hard to know what is in production, who can change it, or whether a package has been tampered with. A central, access-controlled, scanned registry brings order and safety.

Many formats
Containers, Helm, Maven, npm, Python, Go, OS packages and more
Managed
No servers, disks or storage clusters to run
Integrated
Works with Cloud Build, GKE, Cloud Run, IAM and scanning
i
Good to Know

Artifact Registry is the successor to Container Registry, Google’s older image storage service. Container Registry has been retired in favor of Artifact Registry, and older gcr.io addresses are supported through Artifact Registry. Always check current documentation for migration details and supported formats.

2Why Artifact Registry Exists

Understanding where it came from explains why it supports so many formats and so many security features.

Google’s first image storage service, Container Registry, was built around container images stored in Cloud Storage buckets. It worked well but was limited: it handled only container images, its permission model was tied to storage buckets, and it lacked features such as per-repository access, regional placement and support for other package types. Meanwhile, software teams used many package formats in the same project and wanted one consistent system rather than a different tool for each.

Artifact Registry was designed to fix this. It introduced repositories as first-class resources, each with a format, a location and its own permissions. It added more formats, regional and multi-regional storage, remote and virtual repositories, cleanup policies, and tighter links to security scanning and deployment tools. Over time, Container Registry was phased out in favor of it.

1

Images in Buckets

Early container image storage relied on Cloud Storage buckets with project-wide permissions and a single format.

2

Many Package Tools

Teams ran separate systems for Java, JavaScript, Python and operating system packages, each with its own rules.

3

A Unified Registry

Artifact Registry brings multiple formats under one service with repository-level control.

4

Supply Chain Focus

Scanning, metadata, provenance and policy checks tie the registry into broader software supply chain security.

5

Retirement of the Old Service

Container Registry is replaced, with Artifact Registry taking over the role, including support for legacy gcr.io addresses.

“If you cannot say what is inside your software, you cannot say whether it is safe.”

3Core Concepts and Vocabulary

A handful of terms appear in every conversation about Artifact Registry. Learn them once and everything else becomes easier.

Term 1

Repository

A named storage space for artifacts of one format in one location. Repositories are the main unit of organization and access control.

Term 2

Package or Image

A named software item inside a repository, such as a container image called “web-app” or a library called “payments-client”.

Term 3

Version

One specific release of a package, identified by a version number or, for container images, by a unique digest.

Term 4

Tag

A human-friendly label on a container image, such as “latest” or “v1.4.2”. Tags can move; digests cannot.

Term 5

Digest

A unique fingerprint of a container image’s exact contents. If the content changes, the digest changes.

Term 6

Format

The kind of artifact a repository holds, such as Docker, Maven, npm or Python.

Term 7

Location

The region or multi-region where a repository’s data is stored.

Term 8

Repository Mode

Standard, remote or virtual. The mode decides where artifacts come from and how they are served.

Term 9

Upstream Source

An outside registry, such as a public package index, from which a remote repository fetches and caches items.

Term 10

Artifact Analysis

The companion service that scans artifacts for known vulnerabilities and stores related metadata.

Simple Analogy

Imagine a music streaming app. A repository is a playlist folder for one type of media, a package is a song, a version is a specific recording of that song, a tag is the friendly name like “live version”, and a digest is the unique file fingerprint that proves it is exactly the recording you expect.

flowchart TD
  P[Google Cloud Project] --> R1[Repository: Docker, us-central1]
  P --> R2[Repository: Maven, europe-west1]
  P --> R3[Repository: Python, us-central1]
  R1 --> I1[Image: web-app]
  I1 --> V1[Version by Digest]
  V1 --> T1[Tags: v1.4.2, latest]
  R2 --> PK[Package: payments-client]
  PK --> V2[Versions 1.0, 1.1, 1.2]
        
FIG 1 — A project holds repositories; repositories hold packages; packages hold versions

4Supported Formats

One of Artifact Registry’s biggest strengths is that it speaks the languages of many tools.

FormatWhat It HoldsTypical Tools
Docker and OCI imagesContainer images for applicationsDocker, Podman, Kubernetes, Cloud Run, Cloud Build
Helm chartsPackaged Kubernetes application definitions stored in OCI formHelm, GKE, deployment tools
MavenJava libraries and pluginsMaven, Gradle
npmJavaScript and TypeScript packagesnpm, yarn, pnpm
PythonPython packagespip, twine, poetry
Go modulesGo librariesGo toolchain
Apt and YumOperating system packages for Debian and Red Hat style systemsapt, yum, dnf
Kubeflow pipelinesMachine learning pipeline templatesVertex AI and Kubeflow tools
GenericArbitrary files such as binaries and archivesCommand line tools and custom scripts

Support for formats can grow over time, and some formats have their own limits and rules. Check the current list in the official documentation before you plan around a specific format.

Why one registry for many formats helps

Benefit 1

One Permission Model

The same IAM approach controls access, no matter which format you store.

Benefit 2

One Place to Audit

Logs and policies live together, which makes compliance reviews easier.

Benefit 3

One Network Path

Private networking and perimeter controls apply to all artifacts consistently.

Benefit 4

One Bill

Storage and transfer costs are in a single, understandable service.

!
Common Mistake

Assuming one repository can hold several formats. Each repository has exactly one format. Create separate repositories for Docker images, Maven libraries, Python packages and so on.

5Repository Modes: Standard, Remote and Virtual

Not all repositories work the same way. The mode you choose shapes how artifacts get in and how they are served.

Mode 1

Standard Repository

The normal kind. You upload your own artifacts, such as images built by your pipeline, and the repository stores and serves them.

Mode 2

Remote Repository

A caching proxy for an outside source. The first request fetches the item from the upstream source and stores a copy, and later requests are served from the cache.

Mode 3

Virtual Repository

A single address that combines several repositories behind it, checking them in a priority order you define.

Standard repositories

This is where you publish what you build. A build pipeline creates a container image or library, pushes it to a standard repository, and downstream systems pull it from there. You control who can write to it and who can read from it.

Remote repositories

A remote repository acts as a smart middleman between your builds and a public registry. Instead of every build reaching out to the internet, builds ask your remote repository, which fetches the item once and keeps a copy. This speeds up builds, reduces dependence on outside availability, can help avoid rate limits imposed by public registries and lets you apply your own scanning and access controls to third-party packages. Upstream sources can include well-known public registries and package indexes, and in some cases custom upstream addresses with credentials stored securely.

Virtual repositories

Developers do not want to configure ten different addresses. A virtual repository gives them one address. Behind it, you list the underlying repositories, for instance your own internal packages and a remote repository for the public index, and give each a priority. When someone asks for a package, the virtual repository checks them in order. This also helps defend against dependency confusion attacks, where an attacker publishes a public package with the same name as one of your private packages, because you can set your private repository to a higher priority.

flowchart TD
  D[Developer or Build Tool] --> V[Virtual Repository: One Address]
  V -->|Priority 1| S[Standard Repository: Internal Packages]
  V -->|Priority 2| R[Remote Repository: Cache of Public Index]
  R --> U[Upstream Public Registry]
        
FIG 2 — A virtual repository checks private packages first, then the cached public source
Simple Analogy

A standard repository is your own pantry. A remote repository is a local store that buys from a big wholesaler once and keeps stock on its shelves for you. A virtual repository is a single shopping list that first checks your pantry, then the local store, so you never have to know where each item actually came from.

ANTI-PATTERN-01 Avoid
Problem

Letting build tools fetch packages directly from public sources and your private repository with no defined order of priority.

Why It’s Harmful

A malicious public package with the same name as an internal one can be pulled in by mistake, and builds may break whenever the public source is slow or unavailable.

Correct Approach

Use a virtual repository that places internal repositories ahead of remote ones, and route public dependencies through a remote repository cache.

6Locations, Addresses and Naming

Where a repository lives, and how you address it, affects speed, cost, compliance and day-to-day usage.

Regional and multi-regional repositories

When you create a repository, you choose a location. A regional repository stores data in one region, such as one near your servers. A multi-regional repository stores data across a larger area, such as the United States, Europe or Asia, which can improve availability and serve widely distributed users. For most workloads, a regional repository in the same region as your build and deployment systems gives the best speed and the lowest transfer cost.

The shape of an address

Each format has a host name based on the format and location, followed by the project, the repository and the package. For container images, the address looks like a location-based host name, then the project identifier, then the repository name, then the image name with a tag or digest. Knowing this pattern makes it easy to read configuration files and logs.

Part of the AddressMeaningExample in Words
HostLocation plus format serviceThe docker service in the us-central1 region
ProjectThe Google Cloud project that owns the repositoryYour project’s identifier
RepositoryThe named repository“prod-images”
Image or packageThe item inside the repository“web-app”
Tag or digestThe version label or fingerprint“v1.4.2” or the unique digest

Choosing locations wisely

Rule 1

Stay Close to Consumers

Place repositories in the same region as the clusters and services that pull from them to cut delay and avoid network charges.

Rule 2

Respect Data Residency

Choose locations that meet legal requirements for where software and its data may be stored.

Rule 3

Use Multi-Region for Wide Reach

If systems in several continents pull the same images, consider a multi-regional repository or copies in several regions.

Rule 4

Name Consistently

Adopt naming such as team, environment and purpose, so repositories are easy to find and secure.

i
Design Tip

A repository’s location cannot be changed after creation. If you need to move, you create a new repository in the new location and copy artifacts over. Choose carefully at the start.

7Internal Working: What Happens When You Push and Pull

A look at the journey of an artifact makes the rest of the service easier to understand.

Pushing a container image

A container image is made of layers, which are stacked chunks of files, plus a manifest that lists the layers and a small configuration. When you push an image, your tool checks which layers the registry already has, uploads only the missing ones, and then uploads the manifest. Because layers are shared, many images that share a common base only store that base once, saving space and time.

1

Authenticate

Your tool proves who it is, typically with a Google Cloud identity or a service account token.

2

Authorize

The service checks that the identity has permission to write to that specific repository.

3

Upload Missing Layers

Only layers not already stored are sent, which makes repeat pushes fast.

4

Store the Manifest and Tag

The manifest is saved, the digest is computed and tags are attached.

5

Trigger Scanning and Events

If scanning is enabled, analysis begins, and notifications can be published for automation.

Pulling an artifact

When a cluster or service pulls an image, it authenticates, requests the manifest by tag or digest, then downloads the needed layers. For remote repositories, if the item is not yet cached, the service first fetches it from the upstream source, stores it and then serves it. For virtual repositories, the service checks the underlying repositories in priority order.

sequenceDiagram
  participant B as Build Pipeline
  participant AR as Artifact Registry
  participant AA as Artifact Analysis
  participant K as GKE or Cloud Run
  B->>AR: Push image layers and manifest
  AR->>AA: Request vulnerability scan
  AA-->>AR: Store findings and metadata
  K->>AR: Pull image by tag or digest
  AR-->>K: Return manifest and layers
        
FIG 3 — The path of an image from build, to registry, to scan, to deployment
Simple Analogy

Shipping a sandwich shop’s meal kits: you pack ingredients in standard boxes (layers). If the warehouse already holds the boxes of lettuce and bread from last week, you only send the new filling. The packing list (the manifest) tells the receiver which boxes to open.

i
Practical Insight

Smaller images push and pull faster. Using lean base images, combining steps to reduce layers and ordering instructions so rarely changing layers come first lets the registry reuse more and saves both time and storage.

8Access Control and Authentication

Because artifacts become running software, controlling who can read and write them is a core security task.

IAM at the repository level

Access is managed through Identity and Access Management. You can grant roles at the project level, which affects every repository in the project, or at the repository level, which affects only that repository. Repository-level permissions are the preferred approach, because they follow the principle of least privilege.

Role 1

Reader

Can download and view artifacts. Suitable for clusters, services and developers who only consume.

Role 2

Writer

Can read and upload artifacts. Suitable for build pipelines that publish.

Role 3

Repository Administrator

Can manage a repository’s settings, permissions and contents, including deletion.

Role 4

Administrator

Can create and manage repositories across a project.

How tools authenticate

MethodHow It WorksBest For
Credential helperThe Google Cloud command line configures your container tool to use your current identityDevelopers working from their own machines
Service account on the platformGKE nodes, Cloud Run and Cloud Build use their attached service accounts automaticallyDeployed workloads and managed build services
Short-lived access tokensA temporary token is used as the passwordScripts and external CI systems needing quick access
Workload identity federationOutside systems exchange their own identity for Google Cloud access without long-lived keysCI systems outside Google Cloud, such as hosted pipelines
Service account keysA downloadable key fileLast resort; avoid when better methods exist
!
Common Mistake

Downloading long-lived service account key files and storing them in build systems or code. Keys leak easily and are hard to rotate. Prefer attached service accounts, short-lived tokens or workload identity federation.

Public access

Repositories can be made readable by anyone, for example to share an open-source package. This is powerful but risky. Be deliberate: review exactly what a repository contains, and never make a repository public if it might hold private code, configuration or secrets baked into images.

ANTI-PATTERN-02 Avoid
Problem

Granting broad project-level writer or administrator roles to many people and pipelines for convenience.

Why It’s Harmful

Anyone with write access can replace an image that production trusts, and a single compromised account can poison every repository in the project.

Correct Approach

Grant repository-level roles, give only build pipelines write access to release repositories, and give runtime systems read-only access.

9Vulnerability Scanning and Artifact Analysis

Storing artifacts is only half the job. Knowing whether they are safe is the other half.

What scanning does

Artifact Analysis examines the contents of your artifacts, such as the operating system packages and language libraries inside a container image, and compares them to databases of publicly known security weaknesses. It then records the findings, with severity levels, against the specific image version. Scanning can run automatically when an image is pushed and can continue as new weaknesses are discovered, because an image that was clean yesterday may be flagged tomorrow.

Simple Analogy

Think of a food warehouse inspector who checks every delivery against a list of recalled products. The list keeps growing. A product that passed inspection last month might be recalled this week, so the inspector re-checks stock regularly and flags affected items.

Feature 1

Automatic Scanning

Scans images pushed to supported repositories and keeps findings up to date as new weaknesses become known.

Feature 2

On-Demand Scanning

Scan an image on request, including images on your own machine before pushing it, useful in pipelines as a gate.

Feature 3

Language Package Scanning

Looks inside supported language packages bundled in images, not only operating system packages.

Feature 4

Software Bill of Materials

A list of every component inside an artifact, useful for audits and for finding where a newly discovered weakness exists.

Feature 5

Metadata and Provenance

Records of how and where an artifact was built, which builder produced it and which source it came from.

Using findings well

1

Scan Early in the Pipeline

Catch problems before images reach shared repositories, using on-demand scanning during builds.

2

Set a Policy

Decide what is unacceptable, for example any critical weakness with an available fix.

3

Fix at the Source

Update base images and libraries, rebuild and redeploy rather than patching running containers by hand.

4

Monitor Continuously

Watch for new findings on images already in production and track time to fix.

!
Common Mistake

Treating scan results as a one-time checkbox. New weaknesses are discovered constantly, so an image that was clean at release can become risky. Rebuild and redeploy regularly, and review findings for long-lived images.

10Software Supply Chain Security: Provenance and Enforcement

A secure registry is one link in a chain. The goal is to know that what runs in production is exactly what you built and approved.

Why supply chain security matters

Attackers increasingly target the steps between writing code and running it: compromised build systems, poisoned dependencies and swapped images. A secure software supply chain aims to make each step verifiable, so that you can prove where an artifact came from and that nobody changed it along the way.

The building blocks

Block 1

Build Provenance

A signed record created by your build system describing what was built, from which source and by which process.

Block 2

Attestations

Signed statements about an artifact, such as “this image passed vulnerability checks” or “this image passed integration tests”.

Block 3

Digest Pinning

Referencing images by their unique digest rather than a movable tag, so what is deployed is exactly what was approved.

Block 4

Admission Policy

A gatekeeper, such as Binary Authorization on supported platforms, that refuses to deploy images lacking the required attestations.

flowchart LR
  A[Source Code] --> B[Trusted Build with Provenance]
  B --> C[Push Image to Artifact Registry]
  C --> D[Scan and Test]
  D --> E[Create Attestation]
  E --> F{Deployment Policy Check}
  F -->|Required proof present| G[Deploy to GKE or Cloud Run]
  F -->|Missing proof| H[Deployment Blocked]
        
FIG 4 — A policy gate allows only artifacts with the required proof to reach production
Simple Analogy

Think of a passport check at an airport. The traveler (the image) needs a passport (attestation) stamped by trusted offices (the build and scan steps). Without the right stamps, the gate does not open, no matter how confident the traveler looks.

i
Design Tip

Begin in audit mode. Many policy tools can first log what they would have blocked, so you can fix gaps without breaking deployments, and then move to enforcement once the pipeline reliably produces the right proof.

11Tagging, Versioning and Immutability

How you label artifacts decides how safely and predictably you can deploy and roll back.

Tags can move, digests cannot

A tag such as “latest” is just a label that can be reassigned to a different image at any time. If a deployment refers to “latest”, two servers started a day apart might run different code without anyone noticing. A digest is a fingerprint of exact content and never changes. For anything important, deploy by digest, or by a version tag that your process never reuses.

Immutable tags

Docker repositories can be configured so that a tag, once assigned, cannot be moved to a different image. This prevents accidental or malicious overwriting and gives each release label a permanent meaning.

StrategyExampleStrengthWeakness
DigestReference by the exact content fingerprintPerfectly reproducibleHard for humans to read
Semantic version tagv1.4.2Readable and meaningfulNeeds discipline not to reuse
Commit-based tagShort source commit identifierTraceable to the exact codeNot obviously ordered
Environment tagstaging, productionShows promotion stateMoves, so avoid for deployment references
LatestlatestConvenient for experimentsUnpredictable; avoid in production

Promotion across environments

A common pattern keeps separate repositories for different stages, such as development, staging and production. An image is built once, tested, and then promoted by copying the same image, with the same digest, into the next repository, rather than rebuilding it. This ensures the thing you tested is the thing you ship, and lets you restrict who can write to the production repository to your trusted pipeline only.

1

Build Once

The pipeline builds an image and pushes it to a development repository.

2

Test and Scan

Automated tests and scans run against that exact image.

3

Promote by Copying

If checks pass, the same image is copied into the staging, then the production repository.

4

Deploy by Digest

Deployment references the image by its digest or by an immutable version tag.

ANTI-PATTERN-03 Avoid
Problem

Deploying production workloads using the “latest” tag, or rebuilding the image separately for each environment.

Why It’s Harmful

Different servers may run different code, rollbacks become guesses, and the image that was tested may not be the image that ships.

Correct Approach

Build once, tag with immutable versions, promote the same image between environments and deploy by digest.

12Cleanup Policies and Storage Hygiene

Left alone, registries grow forever. Every build adds new versions, and storage is billed.

The problem of endless growth

A busy team may push hundreds of images a day. Most are old test builds that nobody will ever use again. Without cleanup, storage costs climb, searching becomes noisy and scanning covers many stale items.

Cleanup policies

Cleanup policies let you define rules that automatically delete or keep versions in a repository. Rules can be based on tag status, tag prefixes, version age or the number of recent versions to keep. You can combine “delete” rules with “keep” rules, where keep rules take priority so you never lose the artifacts you need. A dry run mode shows what would be deleted before you turn the policy on.

Rule 1

Delete Untagged Versions

Remove images that no longer have any tag, which are often leftovers from earlier builds.

Rule 2

Delete Old Test Builds

Remove versions with a development-style tag after a set number of days.

Rule 3

Keep Recent Releases

Always keep the latest several versions of each package, for rollback.

Rule 4

Keep Release-Tagged Versions

Protect versions carrying release tags from automatic deletion.

1

Decide What Must Be Kept

List the releases, rollback targets and compliance items that must never be deleted.

2

Define Cleanup Rules

Write delete rules for the clutter, and keep rules for the protected items.

3

Run in Dry-Run Mode

Review the report of what would be deleted, and adjust.

4

Enable and Monitor

Turn the policy on and watch storage and any complaints from teams.

!
Common Mistake

Turning on aggressive deletion without a dry run, then discovering that a rollback image or a rarely deployed service’s image was deleted. Always preview, and add keep rules for important versions.

13Integrations: Cloud Build, GKE, Cloud Run and CI/CD

Artifact Registry sits in the middle of the delivery pipeline. Here is how it connects to its neighbors.

Integration 1

Cloud Build

Builds images and packages and publishes them to the registry. Build provenance records can be attached automatically.

Integration 2

Google Kubernetes Engine

Clusters pull images from repositories using node or workload identities, ideally with read-only access.

Integration 3

Cloud Run

Deploys container images from the registry as serverless services and jobs.

Integration 4

Cloud Deploy

Delivery pipelines promote a release through environments using images stored in the registry.

Integration 5

Compute Engine and Other Runtimes

Virtual machines and other platforms can pull images or packages with proper credentials.

Integration 6

External CI Systems

Hosted pipelines can push and pull using workload identity federation or short-lived tokens.

Integration 7

Pub/Sub Notifications

Repository events can be published so other systems react to new pushes automatically.

Integration 8

Binary Authorization and Security Tools

Policies and scanners use registry metadata to decide what may deploy.

flowchart LR
  DEV[Developer Commits Code] --> CB[Cloud Build]
  CB --> AR[Artifact Registry]
  AR --> SCAN[Artifact Analysis Scan]
  AR --> CD[Cloud Deploy]
  CD --> GKE[GKE Cluster]
  CD --> CR[Cloud Run]
  AR --> PS[Pub/Sub Notification]
  PS --> AUTO[Automation and Alerts]
        
FIG 5 — Artifact Registry connects the build, scan, deploy and automation stages
i
Good to Know

When a cluster fails to pull an image, the cause is almost always one of three things: the wrong address, missing read permission for the cluster’s identity, or a network path that cannot reach the registry. Check them in that order.

14Networking, Encryption and Compliance

Artifacts often contain valuable code, so the network and encryption layers matter.

Control 1

Private Access

Machines without external addresses can reach the registry using Private Google Access, keeping traffic off the public internet.

Control 2

VPC Service Controls

A perimeter around the service reduces the risk of artifacts being copied outside approved boundaries.

Control 3

Encryption at Rest and in Transit

Data is encrypted by default. Customer-managed encryption keys are available if your policies require control over keys.

Control 4

Audit Logs

Admin and data access logs record who changed or retrieved artifacts, supporting investigations.

Control 5

Location and Residency

Choose repository locations that meet legal requirements for where software is stored.

Control 6

Secret Handling

Store upstream credentials for remote repositories in a secure secrets service, never in configuration files.

!
Common Mistake

Baking passwords, keys or tokens into container images or packages. Anyone who can read the artifact can extract them, and scans may not catch them. Keep secrets out of artifacts and inject them at runtime from a secrets service.

15Migrating from Container Registry

Many organizations started with Container Registry. Moving to Artifact Registry is a common, well-trodden task.

What changes

Container Registry stored images in buckets with bucket-level permissions and project-wide addressing. Artifact Registry uses repositories with their own permissions and different host names. Google provides ways to keep older gcr.io style addresses working by hosting them in Artifact Registry, and tools to copy existing images, so most migrations are gradual rather than abrupt.

1

Inventory What You Have

List the images, projects and systems that use the old addresses, including builds, clusters and scripts.

2

Create Repositories

Create repositories in suitable locations, with the repository-level permissions you actually want.

3

Copy or Redirect

Copy images over, or enable the support for legacy domain names so existing references continue to work.

4

Update Consumers

Change build configurations, deployment files and clusters to the new addresses over time.

5

Verify and Retire

Confirm that nothing still depends on the old paths and remove obsolete resources.

i
Design Tip

Use the move as a chance to improve security: switch from broad project-wide access to repository-level roles, introduce cleanup policies and enable scanning, instead of copying the old setup exactly.

16Monitoring, Logging and Troubleshooting

When a deployment fails to fetch an image at midnight, you want answers quickly.

SymptomLikely CauseWhat To Check
Permission denied on pullRuntime identity lacks reader accessRepository-level IAM for the cluster or service identity
Permission denied on pushPipeline identity lacks writer accessRoles on the target repository and correct authentication
Image not foundWrong location, repository, name or tagFull address, region and whether the version was cleaned up
Pull is very slowCross-region pulls or huge imagesRepository location versus cluster region, image size and layer reuse
Builds fail to fetch dependenciesUpstream unavailable or wrong virtual repository priorityRemote repository status, priorities and credentials
Unexpected package version usedDependency confusion or wrong priority orderVirtual repository ordering and version rules
Unexpected storage growthNo cleanup policy or many large imagesCleanup rules and image sizes
Scan results missingScanning not enabled or unsupported contentScanning settings and supported formats

What to monitor

Signal 1

Audit Logs

Who pushed, deleted or changed permissions, especially on production repositories.

Signal 2

Storage Growth

Track repository sizes so unexpected jumps are noticed early.

Signal 3

Vulnerability Findings

Count and age of critical findings in images currently deployed.

Signal 4

Quota and Request Metrics

Watch request rates and quotas so bursts of pulls do not hit limits.

i
Practical Insight

Large clusters that start many pods at once can generate a burst of pulls. Keep images small, spread rollouts out, and make sure quotas leave headroom for such bursts.

17Cost and Pricing

Artifact Registry costs are modest compared with compute, but they can still surprise you.

Cost 1

Storage

Billed per gigabyte per month for stored artifacts, often with a small free allowance. This usually grows steadily without cleanup.

Cost 2

Network Egress

Pulling artifacts within the same region is generally free of transfer charges, while moving data across regions or out of Google Cloud can incur costs.

Cost 3

Scanning

Vulnerability scanning has its own charges, which depend on the type and number of scans.

Cost 4

Remote Repository Caching

Cached upstream content counts as stored data, and fetching from upstream may involve outside transfer.

Cost 5

Build and Pipeline Time

Slow pulls and bloated images lengthen builds and deployments, which costs compute time.

Ways to keep costs down

Good Habits

  • Use cleanup policies with keep rules and dry runs
  • Keep repositories in the same region as consumers
  • Build lean images with shared base layers
  • Use remote repositories to cache heavily used public packages
  • Promote one image across environments instead of rebuilding
  • Review storage and scanning charges monthly

Cost Traps

  • No cleanup, so storage grows without limit
  • Cross-region pulls from large clusters
  • Huge images with many unused tools and layers
  • Duplicate copies of the same image in many repositories
  • Pulling very large public images repeatedly with no cache
!
Important

Prices and free allowances change over time and vary by region. Always confirm current rates on the official Artifact Registry pricing page before planning a budget.

18Artifact Registry Compared with Other Options

Several tools can store artifacts. Knowing the differences helps you choose.

OptionWhat It IsBest Fit
Artifact RegistryManaged multi-format registry on Google CloudTeams on Google Cloud wanting integrated, secure artifact storage
Container RegistryEarlier container-only service, now retired in favor of Artifact RegistryNot for new work; migrate existing use
Cloud Storage bucketsGeneral object storagePlain files and archives without registry features
Public registries such as Docker HubHosted public image and package sourcesOpen-source sharing, used through a remote repository cache for safety and reliability
Self-hosted artifact managersSoftware you run yourself for storing artifactsOrganizations with special needs or multicloud setups who accept the operations work
Other cloud providers’ registriesEquivalent services in other cloudsWorkloads primarily running in those clouds
Simple Analogy

A Cloud Storage bucket is a big empty garage where you can put anything. Artifact Registry is a purpose-built warehouse with labeled aisles, a security desk, an inspection counter and an inventory system. You can store boxes in a garage, but you will miss the inventory and the inspector.

flowchart TD
  Q1{Are you running software on Google Cloud?} -->|Yes| Q2{Need containers or language packages?}
  Q1 -->|No| A1[Consider the registry of your main cloud]
  Q2 -->|Yes| A2[Artifact Registry]
  Q2 -->|No| Q3{Only plain files?}
  Q3 -->|Yes| A3[Cloud Storage or Generic format repository]
  Q3 -->|No| A2
        
FIG 6 — A simple guide to choosing where to store artifacts

19Design Patterns and Anti-patterns

Patterns capture what experienced teams repeatedly find works; anti-patterns capture what goes wrong.

Helpful patterns

Build Once, Promote Many

An image is built a single time, tested and scanned, then copied unchanged through development, staging and production repositories. The same digest runs everywhere.

Separate Repositories per Stage

Development repositories allow broad write access for developers, while production repositories allow writes only from the trusted release pipeline.

Remote Cache for Public Dependencies

Builds fetch public images and packages through a remote repository, speeding them up, avoiding rate limits and allowing scanning and control of third-party code.

Virtual Repository as the Single Address

Developers configure one address. Behind it, internal repositories take priority over cached public ones, protecting against dependency confusion.

Policy-Gated Deployment

Only images with required attestations, such as a passing scan and trusted build provenance, are allowed to run in production.

Regional Mirrors for Global Services

Images are copied to repositories in each region where clusters run, so pulls are fast and stay free of cross-region charges.

Anti-patterns to avoid

ANTI-PATTERN-04 Avoid
Problem

One giant repository for everything, with every team and environment sharing the same permissions.

Why It’s Harmful

Access cannot be limited sensibly, cleanup rules are blunt and a mistake by one team can affect all.

Correct Approach

Create repositories per team, format and stage, with tailored permissions and cleanup policies.

ANTI-PATTERN-05 Avoid
Problem

Using bloated, general-purpose base images with compilers, shells and tools that the application never needs at runtime.

Why It’s Harmful

Images are larger, slower to move and carry many more components that can contain vulnerabilities.

Correct Approach

Use minimal runtime images and multi-stage builds, so the final image contains only what is needed to run.

ANTI-PATTERN-06 Avoid
Problem

Allowing developers to push directly from laptops to production repositories.

Why It’s Harmful

Untested, unscanned and untraceable artifacts can reach production, and there is no reliable record of how they were built.

Correct Approach

Restrict production writes to the automated pipeline and require provenance and checks for every release.

20Advantages, Disadvantages and Real-World Uses

An honest view of strengths, limits and where teams actually use the service.

Advantages

  • Fully managed with no servers or storage to operate
  • One service for many artifact formats
  • Repository-level IAM for fine-grained access control
  • Remote and virtual repositories for caching and safe dependency management
  • Integrated vulnerability scanning, metadata and provenance
  • Cleanup policies to control growth and cost
  • Tight integration with Cloud Build, GKE, Cloud Run and Cloud Deploy

Disadvantages / Trade-offs

  • Repository location cannot be changed after creation
  • One format per repository means more repositories to manage
  • Costs for storage, scanning and cross-region transfer need attention
  • Best experience is within Google Cloud; multicloud setups need extra identity work
  • Some formats have specific rules and limits to learn
  • Migration from older registries takes planning

Real-world examples

Microservices Platform

A company with dozens of services builds each one in Cloud Build, pushes images to team repositories, scans them and promotes tested images to a production repository. GKE clusters pull by digest with read-only access.

Java Enterprise Libraries

A large organization hosts shared internal Java libraries in a Maven repository, with a virtual repository combining them and a cache of the public library index, so builds are fast and private libraries always take priority.

Regulated Financial Firm

A bank enforces that only images built by its trusted pipeline, scanned and attested, can run in production. Repositories sit inside a service perimeter with customer-managed keys and full audit logging.

Data Science Teams

Teams publish internal Python packages and machine learning pipeline templates to repositories, so models and notebooks use consistent, versioned code across projects.

Open-Source Project

A project publishes release images and packages from a public repository with a clear versioning scheme and immutable tags, while keeping its internal build repositories private.

21Best Practices and Frequently Asked Questions

A checklist to carry into every project, followed by answers to common beginner questions.

Best Practices

  • Create separate repositories per format, team and environment
  • Choose locations near consumers and meeting residency rules
  • Grant repository-level roles with least privilege; runtime systems read-only
  • Avoid long-lived keys; use attached identities, short-lived tokens or federation
  • Deploy by digest or immutable version tags, never by “latest”
  • Build once and promote the same image between environments
  • Enable scanning and act on findings; rebuild regularly
  • Use remote and virtual repositories to cache and control dependencies
  • Apply cleanup policies with keep rules and dry runs
  • Keep secrets out of artifacts and enable audit logging

Common Mistakes

  • Broad project-level write access
  • Deploying with movable tags
  • No cleanup, leading to endless storage growth
  • Cross-region pulls and oversized images
  • Treating a single scan as permanent safety
  • Mixing private and public package sources without priorities
  • Baking secrets into images
  • Pushing to production from laptops
Q1Is Artifact Registry the same as Container Registry?

No. Artifact Registry is the newer, broader service that replaces Container Registry. It supports many formats, repository-level permissions and more features, and it can serve older gcr.io style addresses to ease migration.

Q2What can I store in Artifact Registry?

Container and OCI images, Helm charts, and packages for Maven, npm, Python, Go, Apt and Yum, plus Kubeflow pipeline templates and generic files. Check current documentation for the full and latest list.

Q3What is the difference between standard, remote and virtual repositories?

A standard repository stores artifacts you publish. A remote repository caches items from an outside source. A virtual repository gives one address that checks several repositories in priority order.

Q4Why should I avoid the “latest” tag in production?

Because it can point to different images over time, so deployments are unpredictable and rollbacks are unclear. Use digests or immutable version tags.

Q5How do I let my cluster pull images securely?

Grant the cluster’s workload or node identity read access on the specific repository, and make sure it has a network path to the service, such as Private Google Access. Avoid embedding long-lived keys.

Q6Does Artifact Registry scan for vulnerabilities?

Yes, through Artifact Analysis, which can scan supported artifacts automatically or on demand and record findings. Scanning has its own settings and cost, so review them for your setup.

Q7Can I change a repository’s location later?

No. You create a new repository in the desired location and copy the artifacts, then update the consumers.

Q8How do I stop storage from growing forever?

Use cleanup policies with rules to delete old or untagged versions and keep rules for releases and recent versions. Test with a dry run first.

Q9How can I protect against dependency confusion?

Use a virtual repository that ranks internal repositories above remote ones, so internal packages are always chosen when names match, and control which public packages are allowed.

Q10Can external CI systems push to Artifact Registry?

Yes. Use workload identity federation or short-lived tokens so the external system gets temporary Google Cloud access without storing long-lived keys.

Q11How do I make sure only trusted images run in production?

Build in a trusted pipeline that records provenance, scan and attest the image, deploy by digest, and use a deployment policy such as Binary Authorization to block images that lack required proof.

Q12What are the main costs?

Storage, network transfer especially across regions or out of Google Cloud, scanning, and the compute time affected by slow pulls. Cleanup policies and regional placement help control them.

22Summary and Key Takeaways

Artifact Registry is Google Cloud’s managed home for the building blocks of software: container images, Helm charts and language and operating system packages. Repositories organize artifacts by format and location, while standard, remote and virtual modes cover everything from your own releases to cached public dependencies behind one safe address. Repository-level IAM, private networking, encryption and audit logs control access; Artifact Analysis, provenance and attestations add visibility and proof; tagging discipline, immutable versions and promotion keep deployments predictable; and cleanup policies and regional placement keep costs in check. Connected to Cloud Build, GKE, Cloud Run and Cloud Deploy, it becomes the trusted middle of a delivery pipeline. Treat it as a supply chain control point, not just storage, and review current documentation for formats, limits and pricing.

Key Takeaways

  • One registry, many formats — store container images, Helm charts and Maven, npm, Python, Go and OS packages, each in its own repository, replacing the retired Container Registry.
  • Pick the right mode — standard for your own artifacts, remote to cache public sources, virtual to combine repositories with priorities that guard against dependency confusion.
  • Least privilege at the repository level — readers for runtimes, writers only for trusted pipelines, and no long-lived keys where better identities exist.
  • Deploy by digest, build once — avoid “latest”, use immutable tags, and promote the same tested image through environments.
  • Scan and prove — enable vulnerability scanning, rebuild regularly, and use provenance and attestations with deployment policies to block unproven images.
  • Control growth and cost — use cleanup policies with keep rules and dry runs, keep repositories near consumers and build lean images.
  • Secure the surroundings — private access, service perimeters, encryption, audit logs and no secrets baked into artifacts.