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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.