. Advertisement .
. Advertisement .
invalid reference format: repository name must be lowercase
occurred when I worked on my project in Docker. I’ve tried to fix it for some days but have not resolved it yet. Can someone suggest a relevant solution to fix the ”docker: invalid reference format: repository name must be lowercase” issue? Much appreciate your support.
The string you gave cannot be converted into an image by docker. When you execute the image using the docker run command line, this could be an invalid name or the result of a parsing issue earlier in the command line. Or in the case you use all capital letters in the name of your register or repository. When using the docker run command line, this frequently happens as a result of failing to quote parameters with spaces, forgetting the value of an argument, and misreading the command line’s order. Another reason is that a volume mapping is expanding a route name with a space in it when delivering arguments to the run and neither quoting the path or escaping the space. These are the reasons of your error.
If you try to run
Project:latestwith the command
Dir:/data image_refwhile in the directory
/home/user/Some Project Dir, that will define an anonymous
volume /home/user/Somein your container. And here’s how to solve that, let’s use:
If the environment variables are missed:
Which docker will consider this as attempting to execute the command
Spaces image_refwhile using the image
With:latest. The solution is using the environment parameter:
In case you have:
Let’s check carefully whether that your_image_name is declared as an all-lower case string or not.
Docker does not allow mixed characters, let me emphasize that.
docker build -t myfirstechoimage:0.1 .
docker build -t myFirstEchoImage:0.1 .