There are plenty of examples of basic Dockerfile based builds out there, but a production application requires a bunch of different things, such as reproducibility, hardening, health checks, static analysis - and ideally still be quick to build.
Modern containerised 12 factor applications are expected to derive their configuration from environment variables. While Spring Boot does import its common properties from environment variables, sometimes you need to interpolate several variables together, e.g. to form a URL.
An oft-repeated and sensible principle in software engineering is DRY, or “don’t repeat yourself”. Here we will apply this principle to Docker compose files.
To package our application, we’re going to be using Docker. The natural
build language for Docker images are
Dockerfiles, so we will use
Spotify’s Dockerfile Maven plugin.
Spring Boot is a very popular Java framework for creating standalone, production ready web applications. In this series of blog posts, we are going to walk through using Spring Boot 2.0 to build and deploy a simple CRUD REST application.