Metadata-Version: 2.4
Name: cgyle
Version: 1.2.9
Summary: cgyle - container preload
License: GPL-3.0-or-later
License-File: LICENSE
Author: Marcus Schäfer
Author-email: marcus.schaefer@suse.com
Maintainer: Marcus Schäfer
Maintainer-email: marcus.schaefer@suse.com
Requires-Python: >=3.9,<4.0
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: System :: Operating System
Requires-Dist: PyYAML (>=5.4.0)
Requires-Dist: docopt (>=0.6.2)
Requires-Dist: psutil
Requires-Dist: requests (>=2.25.0)
Requires-Dist: setuptools (>=50)
Description-Content-Type: text/x-rst

cgyle
=====

Simple cache update utility for proxy container registries.

cgyle aims to be useful for the `distribution` registry configured
as proxy (pull through cache) as it is documented here:

* https://distribution.github.io/distribution/recipes/mirror/

Such a registry caches the containers on demand. To allow a
pre-setup of the cache with a number of containers before a
user actually pulls it, cgyle can be used.

Such a pre-setup of the containers can be useful for low
bandwidth networks or disconnected server landscape.

Quickstart
==========

To run from source the following steps are needed:

.. code:: bash

    ==> Clone this git

    cd cgyle
    poetry install

    poetry run cgyle --help

1. Trigger a cache update in an already running proxy

    .. code:: bash

        poetry run cgyle --updatecache PROXY_URL --from https://registry.opensuse.org --filter '^opensuse/leap.*images.*toolbox'

   PROXY_URL points to a container registry of the above mentioned
   configuration. It is expected that the container registry proxy
   setup points to the same registry as used in the `--from` parameter
   to lookup the container catalog.

   To effectively trigger the cache update in the PROXY_URL, add
   the `--apply` option.

2. Create a local **distribution format** data tree mirror

    Install or fetch the latest distribution registry container. For example:

    .. code:: bash

        podman pull docker.io/library/registry:latest

    Next run cgyle which will run an instance of the above distribution registry
    configured as a proxy for the `--from` target of the following cgyle call.
    The container data tree produced inside of the container will be shared
    with the host in the specified `my_mirror` directory.

    .. code:: bash

        poetry run cgyle --updatecache local://distribution:my_mirror --from https://registry.opensuse.org --filter '^opensuse/leap.*images.*toolbox' --apply

   Find the data tree below the `my_mirror` directory

