liveBook · Manning

Container

As explained in Spring in Action, Sixth Edition

A containerized application is an application packaged with the files and runtime components needed to run in a container.

A containerized application packages an application with the files and runtime components required to run it in a container. Like an intermodal shipping container, it follows a common format that can be deployed across environments regardless of its contents. section 18.3

A Spring Boot container workflow typically involves:

  • Creating a Dockerfile that starts from an OpenJDK 11 runtime image, copies the built JAR as app.jar, and runs it with java -jar. section 18.3

Packaging a Spring Boot application

A Dockerfile can use target/*.jar so its definition does not depend on the JAR’s name or version, copy that artifact to /app.jar, and start it with java -jar /app.jar. section 18.3

How Spring in Action, Sixth Edition covers it

How deep it goes
Explains container portability, Dockerfile lines, image creation, and execution, while stopping short of container runtime internals.
Examples
Uses an OpenJDK 11 Dockerfile, Docker build and run commands, and Spring Boot Maven or Gradle image tasks.
What it assumes
Assumes a built Spring Boot executable JAR and introduces Dockerfile instructions, image construction, and container startup.
What you can do after
Build and run a Spring Boot container image with Docker or Spring Boot’s image-building tasks.
How it connects
Connects containers with Docker, Dockerfiles, container images, Spring Boot, executable JAR files, and cloud deployment.

Also explained in

Compare how 27 books explain container →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Spring in Action, Sixth Edition. The section links point to the parts of the book it draws on.