Skip to content

Restrict allowed characters in container names #3138

Description

@aanand

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions