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.
Most of the answers above did not work for my case, so I will document this in case somebody finds it helpful. The first line in the dockerfile
FROM node:10
for my case, the word node should not be uppercase i.eFROM NODE:10
. I made that change and it worked.sometimes you miss -e flag while specific multiple env vars inline
e.g. bad:
docker run --name somecontainername -e ENV_VAR1=somevalue1 ENV_VAR2=somevalue2 -d -v "mypath:containerpath" <imagename e.g. postgres>
good:
docker run --name somecontainername -e ENV_VAR1=somevalue1 -e ENV_VAR2=somevalue2 -d -v "mypath:containerpath" <imagename e.g. postgres>
In my case the problem was in parameters arrangement. Initially I had
--name
parameter after environment parameters and then volume andattach_dbs
parameters, and image at the end of command like below.After rearranging the parameters like below everything worked fine (basically putting
--name
parameter followed by image name).In my case was the
-e
before the parameters for mysql dockerCheck also if there are missing whitespaces
Let me emphasise that Docker doesn't even allow mixed characters.
Good:
docker build -t myfirstechoimage:0.1 .
Bad:
docker build -t myFirstEchoImage:0.1 .
I had the same error, and for some reason it appears to have been cause by uppercase letters in the Jenkins job that ran the
docker run
command.