Skip to content
PolyPack
Docs: Docker and OCI

Docker and OCI

Push and pull private container images and Helm charts with docker, helm or any OCI client.

Each Team has its own OCI registry at hopper.cr.polypack.io, beside its npm and Composer host. It speaks the OCI Distribution Specification, so docker, podman, helm, crane, oras and Kubernetes all work with it. Container images (including multi-arch images) and other OCI artifacts, such as Helm charts, are stored the same way. The registry is part of Plans that include OCI.

Log in and pull

Log in · once per machine; any username, the Token as the password. Helm: helm registry login hopper.cr.polypack.io --username token --password-stdin
docker login hopper.cr.polypack.io --username token --password-stdin <<< '<your Token>'
Pull
docker pull hopper.cr.polypack.io/api:latest
Kubernetes · then list it under imagePullSecrets: [{name: polypack}] in each Pod spec
kubectl create secret docker-registry polypack --docker-server=hopper.cr.polypack.io --docker-username=token --docker-password='<your Token>'

Any username works; the password is a PolyPack Token. A public image pulls without logging in.

Push

Log in · once per machine; any username, the Token as the password. Helm: helm registry login hopper.cr.polypack.io --username token --password-stdin
docker login hopper.cr.polypack.io --username token --password-stdin <<< '<your Token>'
Push · with a Token that can publish
docker tag my-image hopper.cr.polypack.io/api:1.0.0
docker push hopper.cr.polypack.io/api:1.0.0
  • Pushing needs a Token with the publish ability. The first push to a new name creates the Pack, as a private Pack.
  • Names are lowercase, one or more parts separated by /: api, hopper/api. The host already says which Team it is.
  • Each tag is a version of the Pack. Pushing a tag again moves it to the new image, as with any registry: pin a digest (@sha256:…) when you need an image that never changes.
  • There is no upload size limit: layers of any size push.
  • A layer shared by several images is stored, and counted toward your Plan's Image storage, once.

Push from GitHub Actions

A GitHub Actions workflow can push with no PolyPack Token stored in GitHub: an Admin adds a trusted publisher to the Pack, and the workflow uses PolyPack's GitHub Action to log docker in with a short-lived Token. See Trusted publishing.

Images pushed this way carry signed provenance: check it with polypack verify oci (see Signatures and provenance).

Immutable tags

Pushing a tag again moves it to the new image, which is how registries work and sometimes not what your customers want. Under Immutable tags on the Pack's page, an Admin can keep version tags (1.4.0, v1.4.0, 1.4.0-rc.1) and tags matching patterns such as release-* where they were first pushed: moving or deleting one through the registry is refused, so api:1.4.0 always means the same image. Tags such as latest, 1 and 1.4 keep moving. An Admin can still delete an immutable tag on the Pack's page if a push went wrong.

Promoting a release

Test an image as 1.4.0-rc.2, then release that same image as 1.4.0 and latest without pulling and pushing it again: on the Pack's Tags tab an Admin chooses Also tag as… (or Tag… on the Manifests tab). It behaves exactly like a push of that tag: a new tag is a new release, a moved tag is recorded in its history, and an immutable tag stays where it is. A notification channel can be told when a tag moves, for every tag or only those matching patterns such as prod*.

Signing images

Sign your images with cosign and your own key, and verify them before they run. PolyPack keeps signatures, attestations and SBOMs with the image they are about: they never show as tags of their own, anyone who can pull the image can read them, and they are deleted with it.

Sign and verify
cosign generate-key-pair
cosign sign --key cosign.key --tlog-upload=false hopper.cr.polypack.io/api@sha256:…
cosign verify --key cosign.pub --insecure-ignore-tlog hopper.cr.polypack.io/api:1.0.0
  • Sign by digest, and keep the signature out of public logs with --tlog-upload=false: cosign's keyless signing writes your image's name and your identity to Sigstore's public transparency log, which suits open-source images, not private ones. A key you keep, or one in your cloud's KMS (--key awskms://…), signs privately.
  • cosign attest and cosign verify-attestation work the same way for SBOMs and provenance.
  • Tools that use OCI 1.1 referrers, such as notation, oras attach and Ratify, work too: PolyPack serves /v2/<name>/referrers/<digest>.
  • Kubernetes admission controllers (Kyverno, Sigstore's policy-controller) can then refuse unsigned images from your PolyPack host.
  • Images pushed through trusted publishing also carry PolyPack's signed provenance, which cosign verify-attestation finds with PolyPack's key: see Signatures and provenance.

Helm charts

Push and pull a chart
helm registry login hopper.cr.polypack.io --username token
helm push api-0.1.0.tgz oci://hopper.cr.polypack.io/charts
helm pull oci://hopper.cr.polypack.io/charts/api --version 0.1.0

On the Pack's Tags tab, Details on a tag gives the exact pull commands (by tag, and pinned to its digest), when and for which platforms the image was built, its OCI labels with the source repository and commit linked, and every image the tag has pointed at, and what is attached to it: signatures, attestations, SBOMs and PolyPack's provenance. The Tags list says which tags are signed, attested or have an SBOM. A Helm chart shows its name, version and app version, and the Pack's setup gives the helm install line.

In CI

GitHub Actions · store a Team Token as the secret POLYPACK_TOKEN
- uses: docker/login-action@v3
  with:
    registry: hopper.cr.polypack.io
    username: token
    password: ${{ secrets.POLYPACK_TOKEN }}
- run: docker pull hopper.cr.polypack.io/api:latest

Deleting

  • Delete a tag in the Pack's Tags list, or with any client that deletes tags (crane delete hopper.cr.polypack.io/api:old) and a Token that can publish. The image stays, untagged, so anything pinned to its digest keeps pulling.
  • Untagged images are listed under the Pack's Manifests. PolyPack never deletes them on its own; an Admin deletes them there when nothing needs them.
  • Layers no image uses any more are removed overnight, and stop counting toward Image storage.

Clients, Grants and Tokens

Images are Packs like any other: grant one to a Client, or add it to a Product the Client has, and its Client Token can pull it; a Token limited to particular Packs only reaches those. A Grant's version constraint matches tags that are version numbers, so tags like latest are hidden from a Client whose Grant has one.