Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Open Policy Containers is a project that packages Open Policy Agent (OPA) policies as OCI images and gives you a Docker-style command-line tool, policy, to build, tag, push, pull, sign, and interactively test them. It does not replace OPA. OPA still evaluates the policy. The registry stores and distributes the policy image, and the project supplies the workflow around it.
What Open Policy Containers is, and what it is not
The project describes itself on its homepage as “A Docker-inspired workflow for OPA policies”, and states that it is a Cloud Native Computing Foundation sandbox project. Those are the project’s own statements, and they describe the project’s status as of the pages reviewed for this article.
As an Amazon Associate I earn from qualifying purchases.
The name is easy to confuse with two adjacent things. The first is OPA’s general support for bundles, which OPA documents as a way to deliver policy and data, including from a remote server or an OCI-compatible registry. The second is the Open Policy Containers Registry, abbreviated OPCR, which OPA’s ecosystem listing describes as a reference policy registry built and hosted on GCP. Open Policy Containers is the authoring and distribution workflow and CLI. OPCR is one registry you can use with it, and it is not required.
What you need before you start
- The
policyCLI installed on the workstation or build machine (installation is covered below). - An OPA policy source directory. The build reference says this directory should contain an OPA bundle manifest and the Rego files that make up the policy. The tutorial can start from an existing OPA project with Rego and data files, or from a sample repository.
- A container registry that supports the relevant OCI artifact media type. The project’s introduction names ECR, Docker Hub, GHCR, GCR, and OPCR as registries tested with the CLI. Other registries are not covered by that statement, so confirm artifact support with your provider before relying on one.
- Cosign, if you want to sign and verify policy image layers. The project demonstrates this workflow, but it is optional for building and pushing.
Install the policy CLI
The CLI is documented for Linux, macOS, and Windows. The documented install routes are release archives, Homebrew, WinGet, and installation with Go. Release archives and package versions change over time, so use the current download page for the exact artifact and version rather than a fixed link or number copied from elsewhere.
#1 Best Overall
How to build and push a policy image
The following sequence follows the project’s tutorial and build reference. The commands are as documented; this article did not independently run them.
- Prepare the policy directory. Confirm that the directory holds your OPA bundle manifest and Rego files. If you are starting from the tutorial, the sample repository provides both.
- Authenticate to the registry. The tutorial walks through registry authentication before the build step. Use the login method your registry requires, and confirm that your account can push to the target repository.
- Build and tag the image. Run the build command against the policy directory, with a full reference:
policy build <directory> -t <registry>/<organization>/<repository>:<tag>The result is a tagged image reference that the tutorial displays for the next step.
- Always include an explicit tag. The build reference warns that the implicit default tag is not an accepted OCI reference for pushing. Choose a tag such as a version or release label rather than relying on a default.
- Push the image. Push the tagged reference to the registry. Once it is in the registry, other systems can pull it by that reference.
Common failure points
- Missing manifest or Rego files. If the directory is not a valid policy source, the build step cannot produce the policy image you expect. Check the directory contents first.
- Untagged or malformed reference. Tags should follow OCI reference conventions. A reference without an explicit tag is the most likely cause of a push problem.
- Unsupported registry. A registry that does not support the required OCI artifact media type will not store the image as intended, regardless of how the build succeeded locally.
Test a policy image interactively
The CLI includes a REPL for evaluating a policy image. It uses OPA’s evaluator, and the image must be pushed to an OCI-compliant registry first:
Rank #2
policy repl <registry>/<organization>/<repository>:<tag>
Because the REPL reads the image from the registry, it tests the same artifact your other systems would pull, not a local copy that might have drifted. The REPL documentation describes its use in more detail.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsHow this relates to OPA bundles
OPA’s bundle mechanism is the general way it loads policy and data from outside the process, and OPA’s documentation covers storing policies in OCI-compatible registries. Open Policy Containers adds a Docker-like build, tag, push, and pull workflow around that OCI policy image model. Nothing in the project’s documentation says every OPA deployment must use OPCR or this CLI. If your team already distributes OPA bundles by another method, the question is whether an OCI image workflow gives you enough benefit to justify changing it.
Rank #3
Signing and trust
The project demonstrates signing and verifying policy image layers with Sigstore’s cosign. Signing gives you a way to check who published an image and that it has not changed, but only to the extent that your team manages the signing identities or keys and enforces verification. A valid signature does not show that a policy is correct, safe, or compliant. Decide who is allowed to publish policy images, and make verification a required step in the deployment path rather than an optional check.
Choosing an approach
The sources do not establish a universal winner. The choices below are the ones that matter for most teams.
Rank #4
| Decision | Option A | Option B | What to check |
|---|---|---|---|
| Distribution method | Policy as an OCI image in a registry, using this workflow | Other OPA bundle delivery options | Existing registry infrastructure, update cadence, policy and data size, and operational constraints. The OPA bundle documentation describes the options. |
| Registry | Your organization’s existing registry, if it supports the required OCI artifact media type | OPCR, described by OPA as a reference policy registry built and hosted on GCP | Access controls, authentication, operational practice, and compatibility. Registries listed as tested in the introduction are not guaranteed to behave identically in every environment. |
| Trust and verification | Signed image layers, verified against keys or identities you manage | Unsigned distribution | Who may publish, and where verification is enforced in your pipeline. |
| Local setup | Install route for the CLI (release archive, Homebrew, WinGet, or Go) | Another supported route on the same OS | Your workstation operating system (Linux, macOS, or Windows) and your team’s package management practice. |
What the sources do not establish
The project pages and OPA references reviewed for this article do not report adoption numbers, performance benchmarks, or measured outcomes. They also do not make security guarantees beyond the signing workflow described above. The tutorial’s example image digest and its “5 minute tutorial” label are examples and editorial labels, not performance figures. If you need throughput, latency, or scale data for your environment, you will need to measure it yourself.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteFor the current project status, supported commands, and install instructions, check the project introduction and the tutorial, since both can change between releases.
Best Value
Open Policy Containers is best read as a packaging and distribution layer for OPA policy. OPA remains the evaluator, and the registry remains infrastructure. Keep those roles separate in your design, and the rest of the workflow follows.
The build reference is the authoritative source for tag and reference rules.
”
The Bottom Line
Use Open Policy Containers if your team wants Docker-style build, tag, push, and test workflows for OPA policies stored in OCI-compatible registries and is prepared to manage signing identities and verification. Stay with your existing OPA bundle delivery if it already meets your needs; the project does not require a change.
Recommended Free Tools
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

