Registry¶ Polycrate blocks can be pushed and pulled to and from a OCI-compatible registry. Polycrate uses as the default registry to obtain blocks from or push them to.

You can define your own registry by using –registry-url and pointing it to your OCI-compatible registry or simply include the registry URL in the block’s name, just like with Docker.

Polycrate does not implement authentication with the registry but instead makes use of your local Docker credential helper. To authenticate against a registry, run docker login $REGISTRY_URL before pushing or pulling blocks.

Pull blocks¶ To dynamically add blocks to the workspace from the registry, you can run polycrate pull $BLOCK_NAME:$BLOCK_VERSION. If $BLOCK_VERSION is not defined, latest will be assumed.

Blocks can be uninstalled from the workspace by running polycrate block uninstall BLOCK1 or simply deleting the block’s directory.

If you want to use a custom registry, reference it when pulling blocks or adding them to the workspace dependencies: polycrate block pull

Push blocks¶ To push a block to an OCI-compatible registry, run the following command: polycrate block push $BLOCK_NAME.

If the block name doesn’t contain a valid registry url, a default registry will be used. A custom registry can be used as target by giving the block an appropriate name, like: Polycrate will resolve the registry url from the block’s name.


When pushing a block, omit the tag (what’s coming after the :) as Polycrate will automatically add the version defined in the block’s block.poly to the image.

Block directory¶

The block directory is the directory that contains custom code and the block.poly file of a block underneath the blocks root.


By convention, the name of the block directory should be the same you defined in the name stanza of that Block.

Block configuration¶

The block configuration (defaults to block.poly) holds the configuration for a single block and must be located in the block directory.


name: custom-block config: baz: foo: bar actions: install: script: - echo “Install” uninstall: script: - echo “Uninstall” The config stanza of the block configuration is free form and not typed. You can use it to define the configuration structure of your block according to your needs.


Block names are limited to certain characters: ^[a-zA-Z]+([-/]?[a-zA-Z0-9]+)+$.

This constraint applies to ALL name stanzas in Polycrate.


Unsere Container-Experten beraten Sie gerne und individuell. Wir antworten in der Regel innerhalb weniger Stunden auf Ihre Nachricht.

🏠 Halbergstr. 4, 66121, Saarbrücken
🕑 Mo - Fr: 09.00 - 17.00 Uhr
☎ +49 681 3875 3330