Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restrict allowed characters in container names #3138

Closed
aanand opened this issue Dec 9, 2013 · 4 comments · Fixed by #3197
Closed

Restrict allowed characters in container names #3138

aanand opened this issue Dec 9, 2013 · 4 comments · Fixed by #3197

Comments

@aanand
Copy link
Contributor

aanand commented Dec 9, 2013

While it’s cool that I can start a container named ‘☃’, ‘▀ ▁ ▂ ▃ ▄ ▅ ▆ ▇ █ ▉ ▊ ▋ ▌ ▍ ▎ ▏ ▐ ░ ▒ ▓ ▔ ▕’ or ‘ " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ 。 「 」 、 ・’, I'm not convinced it's adding that much value.

After five minutes messing around, / is the one character I've found which does actually cause an error (presumably because it's used as a path separator), so that should definitely be disallowed.

Beyond that, I don't necessarily think Docker should go as far as to only allow, say, a-zA-Z0-9_ (which feels arbitrarily Western-centric, among other things), but the current level of permissiveness feels to me like a bunch of errors waiting to happen.

@crosbymichael
Copy link
Contributor

@aanand What would you like to see added to a-zA-Z0-9_ ?

@bfirsh
Copy link
Contributor

bfirsh commented Dec 9, 2013

I quite like the idea of app name restrictions being consistent with images and users (i.e. a-zA-Z0-9_).

@jamtur01
Copy link
Contributor

jamtur01 commented Dec 9, 2013

What @bfirsh said seems reasonable to me. +1.

@aanand
Copy link
Contributor Author

aanand commented Dec 10, 2013

OK, if there's already a standard restriction in place for images and users, doing the same for container names sounds sensible.

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 a pull request may close this issue.

4 participants