• Register
1 vote
1.8k views

Problem :

Currently I am learning Docker. Recently I came across below Docker error in one of the projects:

“Invalid reference format: repository name must be lowercase”

I am trying to understand the causes of this message and way to fix above error message.

Can someone guide me in solving above error message?

8 5 2
3,230 points

Please log in or register to answer this question.

1 Answer

1 vote

Solution :

I have enough experience in Docker to help you in fixing your error.

Your error invalid reference format clearly suggests that the docker cannot convert a string which you are providing to the image. It can be the invalid name or the from the parsing error earlier in your docker run command line if  you are running the image in that way. With your compose file if you are trying to expand your variable in your image name then I think that variable is not expanding properly.

If you are using the  docker run command line then this error will pop up for not quoting your parameters properly with spaces and also mistaking a order of your command line.

Your command line is ordered as below :

docker ${args_to_docker} run ${args_to_run} image_ref ${cmd_to_exec}

Now the most common error in passing the arguments to your run is the volume mapping while expanding the path name which includes the space in it and also not quoting your path or escaping your space.

Please find below the example:

docker run -v $(pwd):/data image_ref

And proper fix is as below:

docker run -v "$(pwd):/data" image_ref
8 4 1
5,680 points

Related questions

0 votes
1 answer 2 views
2 views
Problem: Cannot find any solution, help needed >Invalid reference format: repository name must be lowercase
asked 5 days ago Chi Omega 13.9k points
0 votes
1 answer 5 views
5 views
Problem: Please help me > Couldn't connect to docker daemon at http+docker://localhost?
asked 6 days ago Rada Gracelynn 7.3k points
0 votes
1 answer 738 views
738 views
Problem : I installed the docker-machine 0.1.0 and docker-compose 1.1.0 on the Mac OS 10.8.5. Docker-machine is running normally and able to connect by the docker-machine ssh. But can't connect from docker-compose getting following error: $ docker-compose up ... running? If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable. Why can't I connect? Any clues?
asked Jan 20, 2020 jwilliam 3.9k points
0 votes
2 answers 809 views
809 views
Problem : I have installed docker-machine 0.1.0 and docker-compose 1.1.0 on my Mac OS 10.8.5. My Docker-machine is running normally and it can be connected by docker-machine ssh as follows: $ docker-machine ls NAME ACTIVE DRIVER STATE URL SWARM dev * virtualbox ... Dockerfile FROM centos:centos7 DOCKER_HOST tcp://192.168.99.100:2376 docker-compose.yml web: build: . Why can't I connect? Any clues?
asked Nov 24, 2019 alecxe 7.5k points
0 votes
1 answer 7 views
7 views
Problem: Hi i have an issue that iunable to prepare context: unable to evaluate symlinks in dockerfile path.
asked Mar 18 waseem memon 2.4k points
0 votes
1 answer 7 views
7 views
Problem: Is there a way by which I can invoke docker on windows 10 home?
asked May 3 salim1 60.6k points
0 votes
1 answer 2 views
2 views
Problem: What should I do with this? >Denied: requested access to the resource is denied docker
asked 3 days ago Chi Omega 13.9k points
0 votes
1 answer 17 views
17 views
Problem: Give me an answer please >Dial unix /var/run/docker.sock: connect: permission denied
asked 4 days ago Chi Omega 13.9k points