Invalid generated `$CI_REGISTRY_IMAGE`
As you can see, my username has a trailing hyphen. Thus, my container registry is apparently located at registry.gitlab.com/magneticflux-
. However, the Docker tag spec states that:
Name components may contain lowercase letters, digits and separators. A separator is defined as a period, one or two underscores, or one or more dashes. A name component may not start or end with a separator.
This causes me to be unable to push containers to my registry:
$ docker build -t "$CI_REGISTRY_IMAGE:base" -f Dockerfile.base .
invalid argument "registry.gitlab.com/magneticflux-/docker:base" for "-t, --tag" flag: invalid reference format
See 'docker build --help'.
This is related to #271583 (closed) and #343201, but regarding a different form of normalization.