Skip to content

Publish & Deploy Packages w/OCI

In this tutorial, we are going to run through how to publish a Zarf package to an OCI compliant registry, allowing end users to pull and deploy packages without needing to build locally, or transfer the package to their environment.

  • Internet access to download resources or upload packages
  • Access to a registry (this tutorial uses Docker Hub)

For following along locally, please ensure the following prerequisites are met:

This tutorial will require a registry to be configured (see prerequisites for more information). The below sets up some variables for us to use when logging into the registry:

With those set, you can tell Zarf to login to your registry with the following:

First, create a valid Zarf package definition (zarf.yaml), with the metadata.version key set.

Create the package locally:

CLI Reference

Then publish the package to the registry:

CLI Reference

CLI Reference

Inspecting a Zarf package stored in an OCI registry is the same as inspecting a local package and has the same flags:

CLI Reference

Deploying a package stored in an OCI registry is nearly the same experience as deploying a local package:

CLI Reference

Packages can be saved to the local disk in order to deploy a package multiple times without needing to fetch it every time.

  1. Use the zarf package list command to get a list of the installed packages. This will give you the name of the games package to remove it.
  1. Use the zarf package remove command to remove the helm-oci-chart package. Don’t forget the --confirm flag. Otherwise you’ll receive an error.