Return error if Dockerfile is empty

This closes #3293