since Docker for Desktop on Mac Version 3.2.1 the build fails with:
% docker-compose -f docker/docker-compose.yml build
…
failed to solve with frontend dockerfile.v0: failed to create LLB definition: failed to parse stage name “DEV”: invalid reference format: repository name must be lowercase
If I downgrade the version to 3.1.0 and run the same command, the image is found and no error occurs.
If I had build the image with version 3.1.0 and rebuild it with 3.2.1 all works fine. Seems to be just with newer images.
Your repository name must be in lowercase
This error is not super descriptive but all it means is that docker repository names must be in lower case.
If your image is myregistry.com/myimage:latestmyregistry.com is the repository, myimage is the image name and latest is the tag or version. If no / exists in your image name like nginx:latest it means that its stored in the default docker registry hub.docker.com.
If your image name is something like this DEV/myimage:latest it’s invalid, since DEV (your repo name) is not in lower case. dev/myimage:latest is valid tho.
Thank you for the hint, but the repository names seems to be in lower case: docker-repo.mhkservice.net/macrocom/mariadb:v10.5.8.6
as it works in v3.1.0 there could be a problem in v3.2.1?
Is there a way to see the actually called repository name (some log file)?
Maybe some “sub”-dockerfiles in repo?
Im using a Make-file, docker-compose.yml, the Dockerfile and .env for the call:
Found a solution:
In Dockerfile the “PROD”, “DEV” must be replaced with “prod” and “dev”.
So if you have a line with FROM PROD as DEV
replace with FROM prod as dev
Hello - question – what was your solution? Because the solution as described by @rjkmacrocom would not solve my problem - as the line in the Dockerfile is lower case. So @shamiroy123 what was your solution?
@shamiroy123 and @rjkmacrocom okay – don’t know if this is what happened to you but for me it had to do with my running docker on my laptop – I went back to previous versions and to no avail the error kept occuring. Then I realized that in my Mac terminal window I had failed to define the PWD variable that was to hold the working directory and volume I wanted to mount! Stupid human tricks – the machine didn’t know what PWD was – note to Docker - it would be nice to have better error messages…