In case anyone is running into this problem when trying to tag -t
the image and also build it from a file that is NOT named Dockerfile
(i.e. not using simply the .
path), you can do it like this:
docker build -t my_image -f my_dockerfile .
Notice that docker expects a directory as the parameter and the filename as an option.