Skip to content

Add regex format restriction for container_name#60

Merged
chris-crone merged 3 commits into
compose-spec:masterfrom
hangyan:container-name-regex
Jul 30, 2020
Merged

Add regex format restriction for container_name#60
chris-crone merged 3 commits into
compose-spec:masterfrom
hangyan:container-name-regex

Conversation

@hangyan

@hangyan hangyan commented Apr 11, 2020

Copy link
Copy Markdown
Collaborator

Signed-off-by: Hang Yan [email protected]

What this PR does / why we need it:
Add regex name restriction fort container_name feld.

Which issue(s) this PR fixes:

Fixes #34

Seems this regex restrictions does not appear in the runtime spec, and it's reported by this issue
moby/moby#3138. Accounding the comments, this regex also apply for users and images, so i think it's fair enough to add this restirctions. As for kubernetes, it can easily use some transform methods to fit in this restriction.

Comment thread spec.md Outdated
@hangyan
hangyan force-pushed the container-name-regex branch from 85aeaf6 to 78a3bac Compare April 14, 2020 08:06
@hangyan
hangyan force-pushed the container-name-regex branch from 78a3bac to bc6ed3d Compare April 19, 2020 12:57
Comment thread spec.md Outdated
Compose implementation MUST NOT scale a service beyond one container if the Compose file specifies a
`container_name`. Attempting to do so MUST result in an error.

If represents, `container_name` SHOULD follow the regex fomrat of `[a-zA-Z0-9][a-zA-Z0-9_.-]+`

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo here "fomrat" not "format"

Comment thread spec.md Outdated

@SuperSandro2000 SuperSandro2000 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

@chris-crone chris-crone left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but we should fix the typo mentioned above. Can do so in a followup.

@EricHripko EricHripko left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good ✅

@chris-crone
chris-crone merged commit e5f6d61 into compose-spec:master Jul 30, 2020
@ndeloof ndeloof mentioned this pull request Sep 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Naming limitations for container_name

6 participants