Dockerfile style builds fail if container definition file is in .dockerignore (and not `Dockerfile`)

This appears to be a specific Docker feature which treats Dockerfile differently when it’s ignored. From the docs:

You can even use the .dockerignore file to exclude the Dockerfile and .dockerignore files. These files are still sent to the daemon because it needs them to do its job. But the ADD and COPY instructions do not copy them to the image.

The Docker daemon running on our remote hosts needs the Dockerfile to run the build against the uploaded context. But it should not show up in the final image. Docker doesn’t appear to support this feature using a filename other than Dockerfile.