While Spring Boot offers first-class support for Docker out-of-the-box, Docker builds can be tricky to get right, especially when it comes to build sizes.
Java developer Catherine Edelveis therefore has published this useful Guide to Docker Multi-Stage Builds for Spring Boot to get you started.