Sample setup for publishing a Spring Boot app on Heroku within a Docker container.
Adapted from these official sources:
$ ./mvnw package
$ docker build -t heroku-docker-springboot .
$ docker run -p 8080:8080 -e PORT=8080 heroku-docker-springboot
The PORT environment variable is set the same way Heroku would.
$ curl localhost:8080
$ heroku container:login
$ heroku create
$ heroku container:push web
$ heroku container:release web
$ heroku open