Spring Boot application in Docker container
For the purpose of our example, we will start with a simple hello-world type Spring Boot application. We are going to run in on top of official Java image: openjdk
. If you prefer to run it on the Oracle Java image, you can search for it in the DockerHub registry. There are a lot of images that are ready to use, some of them are based on the official images, such as Ubuntu for example. As we saw in Chapter 6, Creating Images, it's always good to pick an official image as the base image. Official images are tested, supported, and usually of very high quality. The basic steps for creating Java application in the container are:
- Using a base image pulled out from the Docker Hub
- Installing the application itself, ...
Get Developing with Docker now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.