If you are currently in a directory with a Dockerfile, do the following:
$ docker build --tag b916af9f0b3e48425cb54c323d1a3adb749a72a1 --file Dockerfile .
Which is equivalent:
$ docker build --tag b916af9f0b3e48425cb54c323d1a3adb749a72a1 .
In both cases . indicates the context of the assembly - a set of directories and files that are sent to the Docker daemon. Use . just installs it in the current directory. Since the Dockerfile is in the current directory, it will be sent to the daemon.
The problem in your example is that it is looking for a Docker file in /var/lib/jenkins/jobs/lumi/workspace/Dockerfile . Presumably, the Dockerfile does not exist, but in your current directory. Since only files in the /var/lib/jenkins/jobs/lumi/workspace directory were sent to the Docker daemon, it does not have a Docker file to build with.
I understand this sounds a little strange. While this does not make sense, it is easiest to run your builds from a directory using the Dockerfile to avoid such problems.
(Also, do not put the Docker file in your home directory or the Download folder, as this will lead to a long wait, since all data is sent to the daemon).
source share