registries parameter on ContainerImage, or under the app’s image.registries configuration in pyproject.toml. In pyproject.toml, this works with both dockerfile and image, and uses the same shape: registry host to username and password. Each registry uses a different authentication method, so follow the section below that matches your registry provider.
A password written as $SECRET_NAME references the fal secret of that name. If your actual password starts with a $, escape it as $$ (for example, write $$abc for the literal password $abc).
Dockerhub
pyproject.toml:
Google Artifact Registry
We recommend using a service account and setting a base64-encoded version of the key as a fal secret.1
Create a JSON key for a service account.
Download the key file to your local machine.
2
Encode the key in base64.
3
Set the result as a fal secret.
4
Use the secret in your code.
pyproject.toml:
Amazon Elastic Container Registry (ECR)
ECR tokens expire every 12 hours. It’s best to auto-generate one on the fly usingboto3 and your AWS credentials.
pyproject.toml, generate the ECR password outside the config and store it as a fal secret. For example, with an authenticated AWS CLI:
Azure Container Registry (ACR)
We recommend using a service principal with theAcrPull role. Unlike ECR there is no short-lived token to refresh. Note that service principal passwords created by az ad sp create-for-rbac are valid for 1 year by default (pass --years to adjust), so update the fal secret when you rotate the credential.
1
Create a service principal with pull access to your registry.
appId and password from the output.2
Set the password as a fal secret.
3
Use the secret in your code.
az acr login --expose-token, since those Entra ID access tokens expire after a few hours.
The same service principal credentials can be configured in pyproject.toml: