A major difference between Docker and Heroku is that Docker can run in an environment of your preference, whether a remote server or a public cloud service like AWS (Amazon Web Services). But that cannot be the case for Heroku, it must run in its cloud environment.