Docker Community Forums

Share and learn in the Docker community.

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.