Docker Repository Configuration
Docker Push Rules - Options - Hosted Only
Docker repositories provide granular control over push operations and access policies.
Configuration Options
allow_tag_overwrite: Whether or not overwriting tags is allowed. This is a boolean value.true: Tags can be overwritten (e.g., pushing tolatestmultiple times)false: Once a tag is created, it cannot be changed- Default:
false(recommended for production) - Note: Even when
false, you can still push new tags for the same image
must_be_project_member: Whether or not the user must be a member of the project to push images. This is a boolean value.true: Only project members can pushfalse: Any authenticated user can push- Default:
false - Use Case: Enable this for team-based workflows where only specific users should be able to push images
must_use_auth_token_for_push: If true, the user must use an auth token to push images. This is a boolean value.true: Username/password authentication is not allowed for pushes, only tokensfalse: Both password and token authentication are allowed- Default:
false - Security Note: Enable this for enhanced security. Users can still use tokens with any username:bash
docker login your-registry.com Username: token Password: nr_your_auth_token_here
require_content_trust: If true, requires signed images (Docker Content Trust/Notary). This is a boolean value.true: Only signed images are acceptedfalse: Unsigned images are allowed- Default:
false - Status: This feature is planned for future implementation
Authentication Configuration
Docker repositories inherit from the general repository authentication settings:
enabled: Controls whether authentication is required for operations- When disabled (
false):- Pull operations (GET/HEAD): Anonymous access allowed
- Push operations (PUT/POST/DELETE): Authentication required
- When enabled (
true):- All operations require authentication
- When disabled (
This follows standard container registry patterns where public registries allow anonymous pulls but require authentication for pushes.
Example Configuration
Public Docker Registry (Pull-only)
{
"type": "docker",
"config": {
"type": "Hosted"
},
"auth": {
"enabled": false
},
"push_rules": {
"allow_tag_overwrite": false,
"must_be_project_member": false,
"must_use_auth_token_for_push": false,
"require_content_trust": false
}
}Behavior:
- Anyone can pull images anonymously
- Authenticated users can push new images
- Tags cannot be overwritten
Private Team Registry
{
"type": "docker",
"config": {
"type": "Hosted"
},
"auth": {
"enabled": true
},
"push_rules": {
"allow_tag_overwrite": false,
"must_be_project_member": true,
"must_use_auth_token_for_push": true,
"require_content_trust": false
}
}Behavior:
- All operations require authentication
- Only project members can push
- Must use auth tokens (not passwords)
- Tags cannot be overwritten
Development Registry
{
"type": "docker",
"config": {
"type": "Hosted"
},
"auth": {
"enabled": false
},
"push_rules": {
"allow_tag_overwrite": true,
"must_be_project_member": false,
"must_use_auth_token_for_push": false,
"require_content_trust": false
}
}Behavior:
- Anonymous pulls allowed
- Any authenticated user can push
- Tags can be overwritten (useful for
latest,dev, etc.) - Flexible for development workflows
Best Practices
Production Registries
- Enable authentication for all operations
- Disable tag overwriting to ensure immutability
- Require project membership to control who can push
- Use auth tokens for CI/CD pipelines
Development Registries
- Allow anonymous pulls for convenience
- Enable tag overwriting for iterative development
- Keep project membership flexible for collaboration
Security Recommendations
- Use auth tokens instead of passwords for automated systems (CI/CD)
- Create separate repositories for production and development
- Regularly rotate auth tokens used in CI/CD
- Monitor repository access logs for suspicious activity
- Enable project membership requirements for sensitive images
Storage Considerations
Docker images can be large (multi-GB). Consider:
- Adequate storage capacity for your registry
- Garbage collection policies to remove unused layers (future feature)
- Layer deduplication is automatic (same layers shared across images)
Future Features
The following features are planned for future releases:
- Proxy Mode: Cache images from Docker Hub and other registries
- Content Trust: Require signed images (Docker Notary)
- Garbage Collection: Automatically remove unused layers
- Vulnerability Scanning: Scan images for security vulnerabilities
- Replication: Replicate images across multiple Nitro Repo instances