Invalid reference format: repository name must be lowercase in Docker
Hello you guys. I'm deploying an Asp.Net on Docker Ubuntu 20.04. After pulling the source code from GitHub I try to create a docker image by using the command below:
docker build -f app:latest -t QDM.CMS/QDM.App /Dockerfile .
But I see an error like this: invalid argument for "-t, --tag" flag: invalid reference format: repository name must be lowercase.
root@faqsdev:~/FAQsDev/QDM.CMS# cd ..
root@faqsdev:~/FAQsDev# docker build -f app:latest -t QDM.CMS/QDM.App /Dockerfile .
invalid argument "QDM.CMS/QDM.App" for "-t, --tag" flag: invalid reference format: repository name must be lowercase
I feel the syntax is wrong but I don't know how to change it. This syntax already worked for me on other servers.
I am using Docker version 20.10.17, build 100c701
Please help me if you have any idea about this issue.
I really appreciate any help you can provide.
-
E1
Erdi Dede Jun 08 2022
Yes, Sure you are the wrong syntax, with Docker version 20, you can use the command below to help create a docker image:
docker build -t [image_name] . -f [path_to_docker_file]/Dockerfile
For example:
docker build -t app:latest . -f QDM.App/Dockerfile
It's already worked for me. Hope it is helpful for you.
* Type maximum 2000 characters.
* All comments have to wait approved before display.
* Please polite comment and respect questions and answers of others.