When building in version 3.2.1 "repository name must be lowercase"

Hi,

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.

Any ideas?

Kind regards
RJK

Info:
MacOS 11.2.3
Docker for Desktop 3.2.1
Engine: 20.10.5
Compose: 1.28.5

Your repository name must be in lowercase :smiley:
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:latest myregistry.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:

.env:
PRIVATE_DOCKER_REPO_URL=docker-repo.mhkservice.net/macrocom
MYSQL_DOCKERIMAGE=mariadb:v10.5.8.6

docker-composer.yml:
mariadb-service:
build:
context: ./mariadb
target: DEV
args:
- DOCKER_REPO_URL={PRIVATE_DOCKER_REPO_URL} - DOCKERIMAGE={MYSQL_DOCKERIMAGE}
env_file:
- .env

Dockerfile:
FROM $DOCKER_REPO_URL/$DOCKERIMAGE as PROD

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

thanks my issue has been fixed.

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…

docker run --rm -v $PWD:$PWD -w $PWD -it gsheynkmanlab/generate-reference-tables prepare_reference_tables.py --gtf gencode.v32.primary_assembly.annotation.gtf --fa gencode.v32.pc.transcripts.fa --ensg_gene ensg_gene.tsv --enst_isoname enst_isoname.tsv --gene_ensp gene_ensp.tsv --gene_isoname gene_isoname.tsv --isoname_lens isoname_lens.tsv --gene_lens gene_lens.tsv --protein_coding_genes protein_coding_genes.txt

can not work with out defining PWD so once I did this

export PWD=*the output from my execution of pwd at the prompt*

all was well