Skip to content

ezgh registry cache-rules create

Create a pull-through cache rule and grant it its credentials.

Updated View as Markdown
ezgh registry cache-rules create --prefix <prefix> --upstream docker-hub --secret <secret> [--description d] [flags]

Create a pull-through cache rule: images pulled at <host>/<prefix>/<namespace>/<repository> come from the upstream (only docker-hub for now) on first pull and are kept in the project. Official Docker Hub images are under library/ (<host>/<prefix>/library/nginx).

--secret is an EZGH Secrets secret with the fields username and accessToken (a Docker Hub access token), by name or ID in the project, or by resource name. Creating the rule then grants it read access to the secret in EZGH Secrets, as you: that needs secrets.grants.create and secrets.versions.access on it. If the grant fails the rule stays; run update with --secret to grant it again.

Part of ezgh registry cache-rules.

Examples

ezgh registry cache-rules create --prefix docker-hub --upstream docker-hub --secret dockerhub/build-bot

Flags

Flag Type Default Description
--description string what it’s for
--prefix string the first part of every image name pulled through it, such as docker-hub
--secret string the EZGH Secrets secret with username and accessToken: a name, ID or resource name
--upstream string where images come from: docker-hub

This command also takes the global flags.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close