Docker EE部署中com.docker.ucp.access.label字段命名格式咨询
com.docker.ucp.access.label) Naming Rules Let's break down the exact rules and answer your specific questions clearly:
Core Naming Requirements
Docker UCP (Universal Control Plane) enforces strict formatting rules for the com.docker.ucp.access.label field to ensure compatibility and consistency:
- Allowed characters: Lowercase letters (
a-z), numbers (0-9), and hyphens (-) - Format constraints:
- Must start with either a lowercase letter or a number
- Must end with either a lowercase letter or a number
- Cannot contain consecutive hyphens (e.g.,
app--examplesis invalid) - No uppercase letters, underscores, dots, or special characters are permitted
Your Specific Scenarios
1. Current label: app-examples
This is fully compliant with the rules: it starts and ends with letters, uses only allowed characters, and has no consecutive hyphens. You can keep using this without any issues.
2. Proposed label: 100app-examples100
This is also valid! It starts and ends with numbers, uses a mix of numbers, lowercase letters, and a single non-consecutive hyphen—all within the allowed character set. Feel free to adopt this label if it aligns with your organization's labeling strategy.
Quick Invalid Label Examples
To help you avoid mistakes, here are some labels that would be rejected by UCP:
App-Examples(contains uppercase letters)_app-examples(starts with an underscore)app--examples(has consecutive hyphens)app-examples!(includes a special character)app.examples(uses a dot instead of a hyphen)
内容的提问来源于stack exchange,提问作者Ramesh Mohan Reddy

