Repository navigation
Using blocks in base job template file #18808
Replies: 1 comment
|
Yes. For a Prefect 3 Docker worker, use a saved block document reference for If you want the pool to always use that block, replace the "registry_credentials": {
"$ref": {
"block_document_id": "REPLACE_WITH_YOUR_BLOCK_DOCUMENT_UUID"
}
}Use the UUID of the saved Docker Registry Credentials block document, rather than the block type/schema ID. Keep the other job configuration fields and the If deployments should be able to override the credentials, keep the usual job configuration entry instead: "registry_credentials": "{{ registry_credentials }}"Then set the "default": {
"$ref": {
"block_document_id": "REPLACE_WITH_YOUR_BLOCK_DOCUMENT_UUID"
}
}The worker configuration loader takes variable defaults, applies deployment overrides, and resolves block document references before constructing the Docker configuration. The Docker worker then uses The worker needs access to that block in the same Prefect server/workspace. This keeps the registry password in the block rather than copying it into the template. I verified the configuration path against the documented implementation; I have not run a deployment against your registry. |
Uh oh!
There was an error while loading. Please reload this page.
The Docker job template file allows us to set docker registry credentials. Is it possible to set it to a reference to an existing Docker registry credentials block?
All reactions