I have questions regarding restrictions about naming images. I search online and saw different issue and answers.
which special characters are not allowed in docker image name? (e.g. '*', '$', ',', '_' ...) Is it possible to use uppercase char for image name?
Description. An image name is made up of slash-separated name components, optionally prefixed by a registry hostname. The hostname must comply with standard DNS rules, but may not contain underscores. If a hostname is present, it may optionally be followed by a port number in the format :8080 .
Multiple tags may refer to the same image. If you reassign a tag that is already used, then the original image will lose the tag, but will continue to exist (it will still be accessible by its image ID, and other tags might refer to it).
The name can contain uppercase letters, lowercase letters, numbers, and underscores (_). The name must be from 1 to 255 characters long. Names are case sensitive. For example, you can have a container named myContainer and a folder named mycontainer because those names are unique.
When a container is created using Docker, Docker provides a way to name the container using the the --name <container_name> flag. However, if no name is provided by the user while creating/running a Docker container, Docker automatically assigns the container a name.
From https://github.com/docker/distribution/blob/master/reference/regexp.go:
// nameComponentRegexp restricts registry path component names to start
// with at least one letter or number, with following parts able to be
// separated by one period, one or two underscore and multiple dashes.
This applies to the image name itself.
/
, and each element of the path has the same restrictions as the image name itself.@
.Expressed with the common bracketed notation:
[somehost.com[:1234]][/some-path/to/the]image-name[:myTag1.2.3]
[somehost.com[:1234]][/some-path/to/the]image-name[@ca468b84b84846e84...]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With