docker build constructs a container image from a Dockerfile and its build context. A typical Spring Boot workflow packages an executable JAR, copies it into an image, and defines the command that runs when a container starts. section 18.3
FROM openjdk:11.0.12-jre
ARG JAR_FILE=target/*.jar
COPY ${JAR_FILE} app.jar
ENTRYPOINT ["java","-jar","/app.jar"]
Use this Dockerfile to base the image on an OpenJDK 11 runtime, select the project JAR, copy it as app.jar, and launch it with java -jar. section 18.3
Build a Taco Cloud image
From the Maven project root, run docker build . -t habuma/tacocloud:0.0.19-SNAPSHOT. The dot supplies the Dockerfile's location and build context; replace it with another path when running the command elsewhere. section 18.3



