I'm familiar with docker but certainly not an expert, so this is surprising to me. Is it really possible to have a single line dockerfile?
The smallest one I've used was probably a screen full, due to updating packages, setting up bundler paths, etc. A production dockerfile is much larger with non-root user shenanigans, etc.
But to answer your question about Heroku, a Procfile is much smaller and more constrained in scope than a Dockerfile.