This is a suggested improvement on the pipeline syntax options that can be used with dockerfile. At current the two options dir and filename don't really coincide with the options of docker build. The filename option seems to map to -f from what I can tell which isn't really a filename but a file + path (e.g. - ./docker/Dockerfile).
My suggestion would be to change filename to just file so a user better understands the mapping to docker build. As this would make dir unnecessary I propose removing that and potentially replacing it with a context option that would point to the docker's build context (the default being the SCM root).
A quick example. The following:
Would translate to the following pipeline syntax:
Happy to expand on anything if that's not clear!