Deployment error Building plesk Cannot locate specified Dockerfile: Dockerfile error

Hello,

I have added a custom template like this:

version: '3'

services:
  IMG:
    restart: always
    build: .
    image: image:v1
    hostname: IMG
    container_name: IMG
    ports:
      # some ports
    # other confs here

And I see the path /var/lib/docker/volumes/home_portainer_data/_data/custom_templates/1 has my docker-compose.yml contents. I added a Dockerfile in the same path and they both are there, but when I try to Deploy the stack button on my Portainer app, I get this error:

Deployment error
Building plesk Cannot locate specified Dockerfile: Dockerfile

Am I doing wrong? How can I add a Dockerfile for my custom template?

Does anybody know?‌‌