"docker build -f" path contains folder with dot results in not found dockerfile

docker build -f "./test-test/Dockerfile" -t test:latest .

Works fine

docker build -f "./test.test/Dockerfile" -t test:latest .

results in Error response from daemon: Cannot locate specified Dockerfile.

Is that intended behavior? What is the reason for that? What are options if folder has to contain dot?

You can name your folder anything you like. I can’t reproduce the issue. Can you tell us more about your environment and what operating system you are using? Are the shared commands exactly what you run? The exact command might be important to notice a special case which usually would not be a problem but maybe in your case it is.

Please, share the output of

docker version