Develop a Custom Container Registry
How to develop a custom container registry
This is an older version of the ZenML documentation. To read and view the latest version please visit this up-to-date URL.
Base Abstraction
In the current version of ZenML, container registries have a rather basic base abstraction. In essence, each container registry features a uri
as an instance configuration and a non-abstract prepare_image_push
method for validation.
This is a slimmed-down version of the base implementation which aims to highlight the abstraction layer. In order to see the full implementation and get the complete docstrings, please check the API docs.
Building your own container registry
If you want to create your own custom flavor for a container registry, you can follow the following steps:
Create a class which inherits from the
BaseContainerRegistry
.Define the
FLAVOR
class variable.If you need to execute any checks/validation before the image gets pushed, you can define these operations in the
prepare_image_push
method. As an example, you can check theAWSContainerRegistry
.Once the
prepare_image_push
gets completed, thepush_image
method will come into play and utilize aDockerClient
object to push the image.
Once you are done with the implementation, you can register it through the CLI as:
Last updated