Jsonnet library for docker registry.
withProxy()
provides a quick way to setup a
mirror.
Install it with jsonnet-bundler:
jb install github.com/grafana/jsonnet-libs/docker-registry
Import into your jsonnet:
// environments/default/main.jsonnet
local registry = import 'github.com/grafana/jsonnet-libs/docker-registry/main.libsonnet';
{
registry:
registry.new()
+ registry.withMetrics()
+ registry.withProxy('proxy-credentials-secret')
+ registry.withIngress(
'registry.example.org',
tlsSecretName='example-org-wildcard',
allowlist=['10.0.0.0/8']
),
}