Containers - Use Google Artifact Registry images with Containers
Key Points
- Use GAR images directly in Wrangler
- Configure credentials by piping service account key
- Only *-docker.pkg.dev hosts supported
Summary
Cloudflare Containers now supports using images hosted in Google Artifact Registry (GAR). After configuring credentials with Wrangler, you can reference a fully qualified GAR image (for example: us-central1-docker.pkg.dev/<PROJECT>/<REPO>/<IMAGE>:<TAG>) in your Wrangler config instead of first pushing the image to the Cloudflare Registry.
Key Points
- Configure GAR credentials with Wrangler by piping the service account JSON key to stdin and providing the service account email and a secret name. Example: cat <PATH_TO_KEY> | npx wrangler containers registries configure <REGION>-docker.pkg.dev --gar-email=<SERVICE_ACCOUNT_EMAIL> --secret-name=<SECRET_NAME>
- In your wrangler.jsonc or wrangler.toml, set the container image to the fully qualified GAR reference. JSONC example: { "containers": [ { "image": "<REGION>-docker.pkg.dev/<PROJECT_ID>/<REPOSITORY>/<IMAGE>:<TAG>" } ] } TOML example: [[containers]] image = "<REGION>-docker.pkg.dev/<PROJECT_ID>/<REPOSITORY>/<IMAGE>:<TAG>"
- Only hosts that match *-docker.pkg.dev are supported for GAR images.
- No need to push the image to Cloudflare Registry first; Wrangler will use the configured GAR credentials to pull images during deployment.
- See the Cloudflare docs: "Use private Google Artifact Registry images" and "Image management" for full configuration and troubleshooting steps.