ERROR: Service failed to build: invalid reference format

Docker gave me this error today when running a

docker-compose -f dev.docker-compose.yml build

Running the build command manually instead of using docker-compose gave me:

$ docker build -f Sourcecode/environments/docker-dev/dev.Dockerfile -t local/myProject .
Sending build context to Docker daemon  30.82MB
Step 1/1 : FROM myRegistry:myPort/myNamespace/core:1.16:1
invalid reference format

The issue is with the image tag: “:1.16:1“. It must be “:1.16.1“.

Just as a reminder of how important it is to be thorough and, of course, what the error might mean if you encounter it. Look for wrong characters.