Docker error: invalid reference format: repository

2020-05-18 04:24发布

Ran into this Docker error with one of my projects:

invalid reference format: repository name must be lowercase

What are the various causes for this generic message?

I already figured it out after some effort, so I'm going to answer my own question in order to document it here as the solution doesn't come up right away when doing a web search and also because this error message doesn't describe the direct problem Docker encounters.

20条回答
爷的心禁止访问
2楼-- · 2020-05-18 05:10

I wish the error message would output the problem string. I was getting this due to a weird copy and paste problem of a "docker run" command. A space-like character was being used before the repo and image name.

查看更多
可以哭但决不认输i
3楼-- · 2020-05-18 05:10

In my case DockerFile contained the image name in mixed case instead of lower case.

Earlier line in my DockerFile

FROM CentOs

and when I changed above to FROM centos, it worked smoothly.

查看更多
登录 后发表回答