a2dcc167a2
This allows the user to configure the registry to treat the first component of the repository as a namespace. Namespaces are completely separate from each other -- they have their own upload areas, and can have different content under the same repository name. In truth, we could omit this entirely and just use longer repository names. But treating it this way may have advantages later if we implement more of the API (e.g., for listing repositories). Or it may allow us to colocate a buildset registry and another registry on the same storage. Or we may, in the future, choose a different method for accessing the different namespaces (e.g., listening on a different port). Or it may be that we find some containers programs don't handle long repository names (I haven't seen that yet, but I haven't tested all of them). At any rate, the design was there from the start, and it's not that much code to implement it. To use this as a buildset registry, you must first choose whether to support docker or OCI tooling. If using, docker, only docker.io can be shadowed. If using OCI, docker.io and all other registries may be shadowed. Docker: * Do not enable the namespaced option. * Add to /etc/docker/daemon.json: "registry-mirrors": ["https://localhost:9000"] * Push and pull content into the registry as normal. OCI: * Enable the namespaced option. * Add to /etc/containers/registries.conf: [[registry]] prefix = "docker.io" location = "docker.io" [[registry.mirror]] location = "localhost:9000/docker.io" [[registry.mirror]] location = "docker.io" * Add similar entries for other registries * When pushing an image into the registry that shadows docker.io, use a command like: skopeo copy containers-storage:docker.io/test/registry \ docker://localhost:9000/docker.io/test/registry * Then a "podman pull docker.io/test/registry" will pull the image as expected. Change-Id: I88273a4a3e56971d2e2847fcd638d86d6bc491fc |
||
---|---|---|
.. | ||
__init__.py | ||
filesystem.py | ||
main.py | ||
storage.py | ||
storageutils.py | ||
swift.py |