Open KrishnaAdityaB opened 7 years ago
We should decide in general whether we want to be sanitizing values of variables so that they meet the naming requirements for images, tags, etc. The current decision was to not do anything since it's more transparent, but that does mean that the default settings don't necessarily always work.
I also encountered this error. Workaround was to lowercase the $(Build.Repository.Name) variable. I used the Transform Value task found in the Market Place.
I'm also running into this issue. I see three possible solutions:
$(Build.Repository.Name):$(Build.BuildId)
=> $(Build.Repository.Name.Lowercase):$(Build.BuildId.Lowercase)
The rules surrounding naming requirements for Docker images and tags are rather complicated. Just lower casing will work for many cases but not all. @KrishnaAdityaB, has there been any effort yet to address this issue? I would suggest that we accept names as is and perform sanitization into valid image names and tags. If it helps, I can dig up the specifics regarding naming (the precise rules aren't documented anywhere, I had to discover them in the Docker code base).
Adding @jikuma who has been working on this task
Copied from https://github.com/Microsoft/vsts-tasks/issues/2988