When trying to run a Dockerfile, this error occurred when running the
docker build step.
Docker failed to solve with frontend dockerfile.v0: failed to create LLB definition: failed to parse stage name "BASE": invalid reference format: repository name must be lowercase
The Dockerfile I have has this command on the first line:
FROM ubuntu:18.04 AS BASE
This problem is quite self explanatory in the error message, the repository name cannot be in upper case.
So the solution is to change the name of the repository to lower case: in my example from BASE -> base
FROM ubuntu:18.04 AS base
You will now be able to run the Dockerfile successfully without receiving that error message.